Skip to content

Instantly share code, notes, and snippets.

View rahul286's full-sized avatar
😷

Rahul Bansal rahul286

😷
View GitHub Profile
@rahul286
rahul286 / linkedin-unfollow.js
Created June 5, 2018 15:17
LinkedIn Unfollow All
# goto https://www.linkedin.com/feed/following/
# in JS console run
var buttons = $("button"),
interval = setInterval(function(){
var btn = $('.is-following');
console.log("Clicking:", btn);
btn.click();
if (buttons.length === 0) {
clearInterval(interval);
@rahul286
rahul286 / docker-examples.md
Created December 4, 2017 09:44 — forked from thaJeztah/docker-examples.md
Some docker examples

Commit, clone a container

To 'clone' a container, you'll have to make an image of that container first, you can do so by "committing" the container. Docker will (by default) pause all processes running in the container during commit to preserve data-consistency.

For example;

docker commit --message="Snapshot of my container" my_container my_container_snapshot:yymmdd
@rahul286
rahul286 / apt-upgrade.sh
Created July 22, 2017 12:01
apt upgrade keeping old config file as it is
apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
@rahul286
rahul286 / rbenv-mac.md
Last active July 21, 2017 19:09
rbenv on mac/ubuntu homebrew method gem bundler path fix
brew install rbenv ruby-build rbenv-bundler

Run

rbenv --init
@rahul286
rahul286 / non-veg.md
Last active June 7, 2017 07:04
Pure non-vegetarian menu on Zomato and Swiggy🍗 😋

Open JavaScript console and run following codes on respective sites. 🍗 😋

It hides all vegeterian dishes from the menu!


Zomato - https://www.zomato.com/

$('.veg').parent().parent().parent().parent().parent().hide()
@rahul286
rahul286 / wp-cli-sed.md
Last active March 21, 2017 12:31
sed extract numbers from filename

Sample file names from wp-cli export example.wordpress.2017-03-03.988.xml

ls -1 | sed 's/example.wordpress.[0-9]*-[0-9]*-[0-9]*.\([0-9]*\).xml$/\1/' 

Extracts 998

@rahul286
rahul286 / 0_reuse_code.js
Created December 28, 2016 16:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@rahul286
rahul286 / nginx-c.rtcamp.com.conf
Last active November 7, 2016 12:13
Proxy to recruitee.com host
server {
server_name c.rtcamp.com www.c.rtcamp.com;
access_log /var/log/nginx/c.rtcamp.com.access.log rt_cache;
error_log /var/log/nginx/c.rtcamp.com.error.log;
location / {
@rahul286
rahul286 / git-commands.md
Created August 16, 2016 15:27
Git Commands

Remove untracked git files, dirs and subdirs

git clean -ffdx

Keybase proof

I hereby claim:

  • I am rahul286 on github.
  • I am rahul286 (https://keybase.io/rahul286) on keybase.
  • I have a public key whose fingerprint is 1C16 B1D6 C728 5F8F BA51 B17D 3F01 7864 3D84 65A7

To claim this, I am signing this object: