Skip to content

Instantly share code, notes, and snippets.

@lancebecker
lancebecker / .json
Last active February 28, 2019 22:23
vscode configuration
{
"workbench.iconTheme": "material-icon-theme",
"workbench.sideBar.location": "left",
"workbench.editor.enablePreview": false,
"workbench.startupEditor": "newUntitledFile",
"workbench.colorTheme": "Snazzy Operator",
"workbench.colorCustomizations": {
"editorError.border": "#f08080"
},
function getQueryParam( param ) {
let loc = document.location.search
if ( document.location.search && param ) {
return document.location.search.split( param + '=' ).pop()
}
}
getQueryParam( 'key' )
if ( pizza ) {
goToHappyPlace()
}
if ( pizza ) {
goToHappyPlace()
}
+angular.module( 'gizmos.filters' ).filter( 'indexToAlphabet', [
+ function() {
+ return function( index, lettercase ) {
+ var index, alphabet, len
+
+ alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ len = ( alphabet.length - 1 )
+
+ if ( lettercase === 'lowercase' ) {
+ alphabet = alphabet.toLowerCase()
alias gti="git"
alias g='git'
alias gs='git status -sb'
alias gl='git log'
alias ga='git add'
alias gc='git commit'
alias gca='git commit -a'
alias gco='git checkout'
alias gm='git commit --amend'
alias gb='git branch'
link rel="apple-touch-icon" href="/touch-icon-iphone.png"
link rel="apple-touch-icon" sizes="76x76" href="/touch-icon-ipad.png"
link rel="apple-touch-icon" sizes="120x120" href="/touch-icon-iphone-retina.png"
link rel="apple-touch-icon" sizes="152x152" href="/touch-icon-ipad-retina.png"
link rel="apple-touch-startup-image" href="/startup-640x1096.png" media="(max-device-width : 548px) and (-webkit-min-device-pixel-ratio : 2)"
link rel="apple-touch-startup-image" sizes="768x1004" href="/startup-768x1004.png" media="screen and (min-device-width : 481px) and (max-device-width : 1024px) and (orientation : portrait)"
git_types () {
echo $(tput setaf 0)$(tput setab 6)
echo '<type>(<scope>): <subject>'
echo "$(tput sgr 0)"
echo "$(tput sgr 3)feat$(tput sgr 0) (feature)"
echo "$(tput sgr 3)fix$(tput sgr 0) (bug fix)"
echo "$(tput sgr 3)docs$(tput sgr 0) (documentation)"
echo "$(tput sgr 3)style$(tput sgr 0) (formatting, missing semi colons, ...)"
echo "$(tput sgr 3)refactor"
@lancebecker
lancebecker / gist:347d5e90d0db3a86d083
Last active August 29, 2015 14:08
Creating gifs from quicktime screencasts for use in github comments / pull requests.

Grab the dependencies first.

brew install ffmpeg

Record your screencast video with Quicktime

Example

Put this function in your .bashrc/zshrc

{
"bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.).
"curly" : true, // Require {} for every new block or scope.
"eqeqeq" : false, // Require triple equals i.e. `===`.
"forin" : true, // Tolerate `for in` loops without `hasOwnPrototype`.
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef" : true, // Prohibit variable use before definition.
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.