Skip to content

Instantly share code, notes, and snippets.

@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 / ArraysAndCallbacks.js
Created April 5, 2017 20:36
Javascript Array iteration, callbacks and function syntax
//ARRAY ITERATION METHODS USING AN ANONYMOUS CALLBACK
// const addOne = function(number){
// return (number + 1)
// }
const arr = [1,2,3,4,5]
console.log(arr.forEach(function addOne(actualItem, indexOfItem, arrayWereGoingThrough){
console.log('actual item: ', actualItem, 'index of item ', indexOfItem)
@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 / 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 / link-to-video.md
Last active August 14, 2017 17:58
How to render a preview image that links to a video on GitHub