Skip to content

Instantly share code, notes, and snippets.

@infindex
infindex / gh-pages.sh
Created March 1, 2019 21:39 — forked from skratchdot/gh-pages.sh
Initialize gh-pages branch
# create gh-pages branch
git checkout --orphan gh-pages
git rm -rf .
touch README.md
git add README.md
git commit -m 'initial gh-pages commit'
git push origin gh-pages
# add gh-pages as submodule
git checkout master
@infindex
infindex / gh-pages.md
Created March 1, 2019 21:38 — forked from ramnathv/gh-pages.md
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
@infindex
infindex / gist:8c84a0fe6aefeb1ac10e97bc6dd750c3
Created September 16, 2016 14:13 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
@infindex
infindex / uninstall_homebrew.sh
Last active August 29, 2015 14:27 — forked from mxcl/uninstall_homebrew.sh
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@infindex
infindex / new_gist_file
Created November 7, 2013 00:59
android screenshot using adb
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
adb shell rm /sdcard/screen.png
@infindex
infindex / 0_reuse_code.js
Created October 25, 2013 05:09
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