Skip to content

Instantly share code, notes, and snippets.

@BenGitsCode
BenGitsCode / Clone-Github-Wiki-Pages.sh
Last active August 7, 2017 15:20 — forked from hanxue/Clone-Github-Wiki-Pages.sh
Cloning Github Wiki Pages
# [ Modified from original => https://github.com/BenGitsCode/instructors.git ]
hanxue-mac:Github hanxue$ git clone https://github.com/AppScale/appscale.wiki.git
Cloning into 'appscale.wiki'...
remote: Counting objects: 1745, done.
remote: Compressing objects: 100% (1733/1733), done.
remote: Total 1745 (delta 1089), reused 10 (delta 4)
Receiving objects: 100% (1745/1745), 267.93 KiB | 35.00 KiB/s, done.
Resolving deltas: 100% (1089/1089), done.
@BenGitsCode
BenGitsCode / gitclean.sh
Created June 14, 2017 23:54 — forked from ericelliott/gitclean.sh
gitclean.sh - cleans merged/stale branches from origin
git remote prune origin
git branch -r --merged master | egrep -iv '(master|develop)' | sed 's/origin\///g' | xargs -n 1 git push --delete origin
@BenGitsCode
BenGitsCode / gist:1ed58b7c133019afc5a0979db6335c50
Created March 14, 2017 13:05 — forked from while0pass/listchars.vim
show/hide hidden characters in Vim
" show hidden characters in Vim
:set list
" settings for hidden chars
" what particular chars they are displayed with
:set lcs=tab:▒░,trail:▓
" or
:set listchars=tab:▒░,trail:▓
" used \u2592\u2591 for tab and \u2593 for trailing spaces in line.
" In Vim help they suggest using ">-" for tab and "-" for trail.
@BenGitsCode
BenGitsCode / gist:3a8146e1eb51082791631e0075795145
Created March 14, 2017 13:05 — forked from while0pass/listchars.vim
show/hide hidden characters in Vim
" show hidden characters in Vim
:set list
" settings for hidden chars
" what particular chars they are displayed with
:set lcs=tab:▒░,trail:▓
" or
:set listchars=tab:▒░,trail:▓
" used \u2592\u2591 for tab and \u2593 for trailing spaces in line.
" In Vim help they suggest using ">-" for tab and "-" for trail.
@BenGitsCode
BenGitsCode / protips.js
Created February 28, 2017 16:49 — forked from nolanlawson/protips.js
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@BenGitsCode
BenGitsCode / sublime-text-3-setup.md
Created February 27, 2017 17:14 — forked from ijy/sublime-text-3-setup.md
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following:
@BenGitsCode
BenGitsCode / .gitconfig-for-diffmerge
Created February 16, 2017 15:16 — forked from YanhaoYang/.gitconfig-for-diffmerge
Using DiffMerge as your Git visual merge and diff tool on Mac
[diff]
tool = diffmerge
[difftool "diffmerge"]
cmd = diffmerge \"$LOCAL\" \"$REMOTE\"
[merge]
tool = diffmerge
[mergetool "diffmerge"]
cmd = "diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$(if test -f \"$BASE\"; then echo \"$BASE\"; else echo \"$LOCAL\"; fi)\" \"$REMOTE\""
trustExitCode = true
@BenGitsCode
BenGitsCode / gist:a6993ad84edddd1b4c7111ed0d1b3c6b
Created February 7, 2017 19:31 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@BenGitsCode
BenGitsCode / init.coffee
Created February 7, 2017 16:05 — forked from darklight721/init.coffee
An atom command and keymap to quickly end lines with semicolons. Only applies for javascript files. Code is based from turbo-javascript package.
# Open up your atom's init script file and add the following lines, then restart atom.
path = require 'path'
endLine = (insertNewLine) ->
editor = atom.workspace.activePaneItem
if path.extname(editor.getPath()) is '.js'
editor.getCursors().forEach((cursor) ->
editor.moveCursorToEndOfLine()
line = cursor.getCurrentBufferLine().trim()
@BenGitsCode
BenGitsCode / npm-upgrade-bleeding.sh
Created January 11, 2017 05:52 — forked from othiym23/npm-upgrade-bleeding.sh
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done