Skip to content

Instantly share code, notes, and snippets.

View SigBaldi's full-sized avatar
💭
Some people get confused when a sentence doesn't end as they potato!

Daniele Baelde SigBaldi

💭
Some people get confused when a sentence doesn't end as they potato!
View GitHub Profile
@SigBaldi
SigBaldi / learnThemByHeart.js
Created November 8, 2015 10:42 — forked from qmmr/learnThemByHeart.js
Tips & Tricks of JavaScript
/* Collection by Marcin Kumorek © 2013 */
/* falsy values */
/*
null
undefined
''
0
NaN
false
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Custom Resize Handle in CSS</title>
<--! JSBin: https://jsbin.com/xodofe/edit?html,css,output -->
<style>
#wrap {
position: relative;
display: inline-block;
@SigBaldi
SigBaldi / Gotchas.js
Last active February 10, 2017 12:46 — forked from gsans/gist:93a6a9edbdf2a393bbb4
JavaScript Funky Behaviours
(function () {
'use strict';
var u; //undefined
//Declares a variable, but does not define a value for it.
/*
** Falsy values:
** • false Surprise!
** • 0 Digit zero
@SigBaldi
SigBaldi / stash-pop-recover
Created June 5, 2020 14:02 — forked from davidwalter0/stash-pop-recover
Undoing accidental git stash pop
# https://stackoverflow.com/questions/6543519/undoing-accidental-git-stash-pop
# https://stackoverflow.com/questions/89332/how-to-recover-a-dropped-stash-in-git
accepted
If you have only just popped it and the terminal is still open, you will still have the hash value printed by git stash pop on screen (thanks, Dolda).
Otherwise, you can find it using this for Linux and Unix:
git fsck --no-reflog | awk '/dangling commit/ {print $3}'
and for Windows: