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.

@dennisseah
dennisseah / gist:8dbb7a23ef9c9c264249
Last active July 12, 2017 10:12
SAPUI5: Organizational Chart with d3.js
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
<style>
.dennisseah-orgchart .node {
cursor: pointer;
}
@cebe
cebe / BaseRESTAction.php
Created May 18, 2013 11:18
REST Action classes for Yii 1.1
<?php
/**
* @todo: add documentation!
*
* @property string|array $returnUrl
*/
abstract class BaseRESTAction extends CAction
{
const HTML = 'html';
@magnetikonline
magnetikonline / README.md
Last active March 14, 2024 22:48
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@havvg
havvg / ajax-form.js
Created August 1, 2012 13:20
jQuery AJAX form submit with Twitter Bootstrap modal
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),