Monday, September 28, 2020

Add images and labels to GitHub Repositories

 Hey aliens! if you are a new open-source contributor on GitHub, then you must be searching how to Add images and labels to GitHub Repositories. So this post will teach you the easiest ways to do it and the best part is that it will take less than 1 minute to learn these 2 things.


Add images in Readme.md file

-create an issue regarding adding an image.

-add the images by using drag and drop or upload method.

- then copy the image address

- Now add ![ alt tag](http://url/to/img.png) to your README.md file or the file where you want to show the image.


Add labels to create issues for repo on GitHub

Have a look at this GIF⚡️  to make the process  super easy



On GitHub, navigate to the main page of the repository.


  • Under your repository name, click Issues or Pull requests.

Issues Labels button


  • Next to the search field, click Labels.


  • Click New Label to create a new label, or click Edit to edit an existing one.


  • In the text box, type your new label name.


  • Select a color for the label from the color bar. You can customize this color by editing the hexadecimal number above the color bar.





  • Click Create Label to save the new label.

I hope it helped you! For any assistance join the community of Guiding Point.





Dark theme for Js apps

There will be no specific role of HTML code in this part.

Just write your code in the body tag. Here for the sake of simplicity, we will choose the body element that will contain our content. You have to just create a button in HTML.




HTML part

<h2>Toggle between Dark  Light Mode</h2>

<p>Hey don't look at me like this , I am just a boring text and nothing more than that.</p>

<button onclick="enabledmode"> Toggle to dark mode</button>


ALERT:  text with this // are all one liner js comments

CSS Part

body{

background-color: white;

color: black;

}


//also create a .dark_mode class to toggle to darkmode


Js part

//we will create a function enabledmode() to execute our plan

function enabledmode(){

// create a variable in body element

var element = document.body

//use classList.toggle DOM element to toggle between two classes.


element.classList.toggle("dark_mode")

}



Saturday, September 26, 2020

Add octocat github follow logo at any position

 




HTML Part

  <a class="github-corner" href="https://github.com/vkassingh" title="Fork me on GitHub" target="_blank">

<svg width="80" height="80" viewbox="0 0 250 250">

<title>Follow Vikas on GitHub</title>

<path d="M0 0h250v250" />

<path class="octo-arm" d="M127.4 110c-14.6-9.2-9.4-19.5-9.4-19.5 3-7 1.5-11 1.5-11-1-6.2 3-2 3-2 4 4.7 2 11 2 11-2.2 10.4 5 14.8 9 16.2" fill="white" style="transform-origin:130px 110px;" />

<path class="octo-body" d="M113.2 114.3s3.6 1.6 4.7.6l15-13.7c3-2.4 6-3 8.2-2.7-8-11.2-14-25 3-41 4.7-4.4 10.6-6.4 16.2-6.4.6-1.6 3.6-7.3 11.8-10.7 0 0 4.5 2.7 6.8 16.5 4.3 2.7 8.3 6 12 9.8 3.3 3.5 6.7 8 8.6 12.3 14 3 16.8 8 16.8 8-3.4 8-9.4 11-11.4 11 0 5.8-2.3 11-7.5 15.5-16.4 16-30 9-40 .2 0 3-1 7-5.2 11l-13.3 11c-1 1 .5 5.3.8 5z" fill="white" />

</svg>

</a>


CSS Part

github-corner:hover .octo-arm{

animation:octocat-wave .56s;

}

@keyframes octocat-wave{

0%, 100%{

transform:rotate(0);

}

20%, 60%{

transform:rotate(-20deg);

}

40%, 80%{

transform:rotate(10deg);

}

}

.github-corner {

  

animation:octocat-wave .56s;

    position: absolute;

    left: 948px;   //adjust the padding according to the logo position 

  top:12px;

}


Result:












Source code for javascript random joke generator using api


ALERT: This is my next project on javascript. For any queries join our telegram group! 


HTML and Js part

<!DOCTYPE html>

<html>

  <head>

    

    <link rel="stylesheet" href="joke.css">

  <title>Random joke generator</title>

  </head>

  

  <body>


<div class="container">

  <a class="github-corner" href="https://github.com/vkassingh" title="Fork me on GitHub" target="_blank">

<svg width="80" height="80" viewbox="0 0 250 250">

<title>Follow Vikas on GitHub</title>

<path d="M0 0h250v250" />

<path class="octo-arm" d="M127.4 110c-14.6-9.2-9.4-19.5-9.4-19.5 3-7 1.5-11 1.5-11-1-6.2 3-2 3-2 4 4.7 2 11 2 11-2.2 10.4 5 14.8 9 16.2" fill="white" style="transform-origin:130px 110px;" />

<path class="octo-body" d="M113.2 114.3s3.6 1.6 4.7.6l15-13.7c3-2.4 6-3 8.2-2.7-8-11.2-14-25 3-41 4.7-4.4 10.6-6.4 16.2-6.4.6-1.6 3.6-7.3 11.8-10.7 0 0 4.5 2.7 6.8 16.5 4.3 2.7 8.3 6 12 9.8 3.3 3.5 6.7 8 8.6 12.3 14 3 16.8 8 16.8 8-3.4 8-9.4 11-11.4 11 0 5.8-2.3 11-7.5 15.5-16.4 16-30 9-40 .2 0 3-1 7-5.2 11l-13.3 11c-1 1 .5 5.3.8 5z" fill="white" />

</svg>

</a>

<h1>Randome Joke 😆 generator</h1>

<div class= "joke_area" ><strong>joke will appear here!</strong></div><br>

 <div class="button">

   

   <button class= "btn new_joke_btn">New joke</button>

   

<a href="" class="btn tweet-btn" target="_blank" rel="noopener noreferrer">Tweet!!</a></div>



  <script src="joke.js">

    

    //select elements

//api requests

//funtion newjoke


// .joke-text

const jokearea = document.querySelector('.joke_area');

// .new-joke-btn 

const newjokebutton = document.querySelector('.new_joke_btn');

    


    const tweetBtn = document.querySelector('.tweet-btn');


newjokebutton.addEventListener('click', getjoke);


// immediately call getJoke()

getjoke();


    function getjoke(){

     

      //make an api request 

      fetch('https://icanhazdadjoke.com/',{ 

        headers: {

          'Accept': 'application/json'

        }

       

        

      }).then(function(response){

        

        return response.json();

        

      } ).then (function(data)

      { 

          const joke= data.joke;

                joke_area.innerText= joke;

              

        

         /* make the tweetBtn(.tweet-btn link) work by setting href */

    // create tweet link with joke

    const tweetLink = `https://twitter.com/share?text=${joke}`;

    // set the href

    tweetBtn.setAttribute('href', tweetLink);

  }).catch(function(error) {

    // if some error occured

    jokeText.innerText = 'Oops! Some error happened :(';

    // removes the old href from .tweet-btn if found any

    tweetBtn.removeAttribute('href');

    // console log the error

    console.log(error);

  });

}

 </script>      

    </body>

</html>


CSS Part

h1{

 text-align: center;

    color: black;

}

.tweet-btn {

  background-color: white;

  color: black;

  border: black;

}


body {

  background-color: black;

  font-family: sans-serif;

  text-align: center;

}


.container {

  height: 600px;

  width: 600px;

  padding: 100px 100px 100px 100px; /* top-right bottom-left */

  background-color: pink;

  align-content: center;

  margin-right: auto;

  margin-left: auto;

}


.joke_area {


  margin-bottom: 30px;

  font-family: monospace;

}




github-corner:hover .octo-arm{

animation:octocat-wave .56s;

}

@keyframes octocat-wave{

0%, 100%{

transform:rotate(0);

}

20%, 60%{

transform:rotate(-20deg);

}

40%, 80%{

transform:rotate(10deg);

}

}

.github-corner {

animation:octocat-wave .56s;

    position: absolute;

    left: 948px;

  top:12px;

}

Result:








Javascript Random joke generator using API

ALERT: This post requires basic knowledge of HTML, CSS, and Javascript and you are good to go if you know this!






 HTML Part 

<div class="container">

<h1>Random joke generator using api></h1>

<div class="joke_area"> Joke will appear here!</div>

<button onclick= "new_joke">New joke</button>

<button onclick="tweet"> Tweet</button>

</div>

CSS Part

It will depend on your creativity. So I leave that part on you


Js Part

So before coding the javascript part, we must brainstorm the logic on paper we are going to apply. So this will involve a simple algorithm for this project. 

first, we will select all the HTML elements using the query selector method, then we will add an event listener to the buttons, and create functions to get new jokes and tweet that joke.

The newjoke() function will fetch the API, collect the response, convert the response into JSON type.


As the JSON data has many different values but we want the only a joke so we will select the joke and replace that with the joke area.  


//selecting the joke_area and buttons 

const jokearea = document.querySelector('.joke_area');

const jokebutton= socument.querySelector('.new_joke')

// we created 2 constants and in brackets we have to put the class name we want to select.

then we will create a new function, that will call or fetch the API, accept the response, convert the response into json format, extract the desired joke data, replace the joke in the joke_area.

function new_joke(){

fetch(''https://icanhazdadjoke.com/'' , 

{ headers: {'Accept': 'application/json' }})

.then(function(response)

{ return response.json(); })

.then(function(data)

cont joke=data.joke;

joke_area.innerText= joke;

)}


function tweet(){



}














 )












}


















Tuesday, September 22, 2020

Random quote generator code

 ALERT: This post requires basic knowledge of HTML, CSS, and Javascript and you are good to go if you know this!



<!DOCTYPE html>

<html>

<head>

<title>Random quote generator</title>

<link rel="stylesheet" href="index.css">

</head>

<body>

<h1>Random quote generator</h1>

<div id="quotes_area"></div>

<button onclick= "newquote" > New quote</button>



<style>

body {

  font-family: system-ui;

  background: #f06d06;

  color: white;

  text-align: center;

}

</style>


<script src="javascript.js">

document.getElementsByTagName("h1")[0].style.fontSize = "3vw";

var quotes= ['Well done is better than well said. ...',

'Knowing is not enough; we must apply. ...',

'Quality is not an act, it is a habit. ...',

'If you are going through hell, keep going.',

'Good, better, best. ...',

'With the new day comes new strength and new thoughts. ...',

'Optimism is the faith that leads to achievement.','Get busy living or get busy dying','You only live once, but if you do it right, once is enough','Money and success don’t change people; they merely amplify what is already there.','Not how long, but how well you have lived is the main thing','In order to write about life first you must live it.']


function newquote(){

var randomnumber= Math.floor(Math.random()* (quotes.length));

document.getElementbyId("quotes_area").innerHTML=quotes [randomnumber]

}

</script>

</body>

</html>


Result:








Thursday, September 17, 2020

GSoC21 with Vikas Singh

  ALERT: Site under construction! For detailed updates join our community

https://t.me/internshipsforall





1. Start with the scripting language like Python or JavaScript.

2. After learning basics do some projects available on GitHub.

Find out organization that provides Projects of your Interest

3. Get an idea of Designing proposal for G shock.

4. Spend time on GitHub


ALERT: Organization Application will start in January 21.Student application will start in March 21


Resources



Connect with GSoCers



 GSoC Proposals 












Learn VFX with Vikas Singh

 ALERT: Site under construction! For detailed updates join our community

https://t.me/internshipsforall








1. It is always recommended to watch CGI break down videos. As they tell us what was done with the actual video.


2. VFX is just a component of filmmaking. It comes under the section of post-production. 


3. Watch movies with lots of visual effects - read about what was done in the movie


4. Choose your Niche and according to that choose your VFX software.


5. Like, Autodesk Maya is used for almost everything while programs like lightwave are used more for TV. Max is more games, and Houdini for smoke and particle effects.


6. Learn animation from this site

http://www.cgmeetup.net/home/12-principles-of-animation-by-frank-thomas-and-ollie-johnston/


7. Before starting VFX start with animation. 


8. For this purpose use evergreen Blender which is free of cost

Saturday, September 12, 2020

Sunday Motivation | Case Studies and Short stories | Startups

 ALERT: Share the post in your class groups if you find the post engaging and motivating. 


There will be 2 stories and 2 morals based on those stories  

2 stories:


1. Yahoo refused Google




2. Nokia refused Android


Moral:

1. Update yourself with time, else you will become obsolete

2. Taking no risk is the biggest risk. Take risks and adopt new technologies. 



2 more stories:

1. Google acquired YouTube and Android

YouTube - Apps on Google PlayGoogle Android Logo Stock Photo, Picture And Royalty Free Image. Image  15621052.


2. Facebook acquired Instagram and WhatsApp

Facebook seeks to knit Instagram and WhatsApp with core app | Financial  Times


Moral:

1. Become so powerful that your enemies become your allies 

2. Grow fast, become big, and then eliminate competition



2 more stories:

1. Barack Obama was an ice-cream seller

Before/ After: 20 celebs that had real jobs before they became famous -  Page 2 of 3


2. Elon Musk was a worker in a lumber mill

10 Things You Didn't Know About Elon Musk



Moral:

1. Don’t judge people based on their past jobs

2. Your present doesn’t decide your future, your courage, and hard work does



2 more stories:

1. Colonel Sanders created KFC at the age of 65

Colonel Sanders founded KFC at the age of 65! Here's his incredibly  inspiring story | Business Insider IndiaColonel Harland Sanders story of Success | Kentucky Fried Chicken (KFC)  founder Success Story - YouTube


2. Jack Ma who was rejected by KFC founded Alibaba

Inspiring Success Story of Jack Ma - Heard the name. Now know his story!Alibaba announces share sale details - BBC News


Moral:

1. Age is just a number - you can be successful at any age

2. Never ever give up in life - only those who never give up win



2 Final stories:

1. The owner of Ferrari insulted a tractor maker

2010 Ferrari 458 Italia | Top SpeedEnzo Ferrari - Wikipedia


2. The tractor maker created Lamborghini

Lamborghini: Never Insult a Tractor Tycoon - YouTubeThe CAR Top 10: wildest Lamborghinis | CAR Magazine


Moral:

1. Never underestimate or disrespect anyone.

2. Success is the best revenge.


You can be successful at any age and from any background.

Dream big. Set goals. Work hard. Never ever give up in life. Your time will come!


ALERT: If you want guidance in any topic or domain join our telegram group!

https://t.me/internshipsforall


Labels: