Skip to content

Instantly share code, notes, and snippets.

@joseluisq
joseluisq / stash_dropped.md
Last active March 28, 2024 11:59
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

module.exports = request_promise_compressed;
var request = require('request-promise')
, bb = require('bluebird')
, zlib = require('zlib');
function request_promise_compressed(url){ // Supports compressed=true;
if (!url.compressed) return request(url);
var resolveWithFullResponse = url.resolveWithFullResponse;
var encoding = url.encoding;
@nkbt
nkbt / .eslintrc.js
Last active April 23, 2024 03:19
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@kwmiebach
kwmiebach / webstorm-cheat-sheet.md
Last active April 11, 2024 11:18
Webstorm cheat sheet
@leoapost
leoapost / gist:4318441
Created December 17, 2012 13:55
Delete all remote branches, except master
# Replace REMOTE_NAME with your remote name (e.g. origin)
git branch -r | grep REMOTE_NAME/ | grep -v 'master$' | grep -v HEAD| cut -d/ -f2 | while read line; do git push REMOTE_NAME :$line; done;