Skip to content

Instantly share code, notes, and snippets.

View anjalbinayak's full-sized avatar

Anjal Binayak Adhikari anjalbinayak

View GitHub Profile
@hallettj
hallettj / global-variables-are-bad.js
Created February 14, 2009 21:15
How and why to avoid global variables in JavaScript
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {
@kristopherjohnson
kristopherjohnson / git-flow-cheatsheet.md
Last active October 3, 2022 11:19
git-flow Snippets
@odan
odan / xampp_php7_xdebug.md
Last active October 19, 2024 04:15
Installing Xdebug for XAMPP
@suriyadeepan
suriyadeepan / wiki_images.py
Created August 26, 2016 06:09
Scrap images from a wiki page using Beautiful Soup
from bs4 import BeautifulSoup
import requests
url = 'https://en.wikipedia.org/wiki/Transhumanism'
# get contents from url
content = requests.get(url).content
# get soup
soup = BeautifulSoup(content,'lxml') # choose lxml parser
# find the tag : <img ... >
image_tags = soup.findAll('img')
@Sandip124
Sandip124 / Git Snippets.md
Last active April 21, 2021 03:06
Git Snippets

Stage All Delete files

git rm $(git ls-files --deleted) 
OR
git add  `git ls-files --deleted`

Unstage File in git

git reset -- fileName
Example: git reset -- index.html