Skip to content

Instantly share code, notes, and snippets.

@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 30, 2024 23:36
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@jfmengels
jfmengels / lodash-fp-documentation.md
Last active February 6, 2024 20:57
Generated docs for Lodash/fp. Help make them better at https://github.com/jfmengels/lodash-fp-docs
@jamsinclair
jamsinclair / shrug.md
Last active July 19, 2022 06:34
Markdown Escaped Shrug

¯\_(ツ)_/¯

@daveaugustine
daveaugustine / Inside_your_router.coffee
Created February 8, 2012 18:33
Super simple Google Analytics page tracking with backbone
initialize: ->
@bind 'all', @_trackPageview
_trackPageview: ->
url = Backbone.history.getFragment()
_gaq.push(['_trackPageview', "/#{url}"])
@mauvm
mauvm / Jasmine-and-Babel6.md
Created November 12, 2015 10:51
Jasmine ES6 run script for use with Babel 6
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine

.babelrc:

{
 "presets": ["es2015"]
@joeytwiddle
joeytwiddle / asyncWrappersForRestify.js
Last active October 7, 2019 02:57
Helper to use promises in restify (might also work for express)
/**
* Use restify with promises
*
* Restify middleware and route handlers are passed a callback function `next`
* which must be called on success, or on an error.
*
* But you may prefer to define your middleware and routes using promises or
* async functions instead of using callbacks.
*
* To achieve that, simply wrap your middleware functions in `middleware()` and
@ryanray
ryanray / deploy.rb
Created November 21, 2013 11:15
I couldn't find a quick example of how to deploy a node.js app using Capistrano 3. This gist assumes you are using Capistrano 3, Upstart, Forever, ssh/forward agent, and an unprivileged user named 'deploy'. Hopefully this simple setup will help to get you started.
# config/deploy.rb
# probably a lot of ways to improve this...
set :application, 'my_app'
set :repo_url, 'git@github.com:USERNAME/my_app.git'
# should set up a deploy user
set :user, 'deploy'
set :deploy_to, '/var/www/my_app'
set :scm, :git
@briandealwis
briandealwis / gist:782862
Created January 17, 2011 13:55 — forked from spullara/gist:782523
One-liner to turn jar with Main-Class into executable shell script
# turn a jar with a Main-Class into a stand alone executable
(echo '#!/usr/bin/env java -jar'; cat blahblah.jar) > blah
# turn a jar with a particular main clas into a stand alone executable
(echo '#!/usr/bin/env java -jar package.MainClass'; cat blahblah.jar) > blah
@thlorenz
thlorenz / .generating-xcode-via-gyp.md
Last active August 26, 2018 15:05
Generating Xcode projects from Node.js binding repos via gyp

This is specifically tailored to Node.js binding projects in which case the C++ layer is always a library.

Clone gyp:

git clone --depth 1 https://chromium.googlesource.com/external/gyp.git gyp

Add the below common.gypi file in the root of the project.

@ScottPolhemus
ScottPolhemus / mixins.less
Last active August 12, 2018 20:17
A collection of LESS mixins.
//
// LESS Utility Mixins
// -------------------
// Fill the parent element
.fill(@spacing: 0) {
position: absolute;
top: @spacing; bottom: @spacing;
left: @spacing; right: @spacing;
}