Skip to content

Instantly share code, notes, and snippets.

@glennblock
glennblock / fork forced sync
Created March 4, 2012 19:27
Force your forked repo to be the same as upstream.
git fetch upstream
git reset --hard upstream/master
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 11, 2024 07:10
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jbspeakr
jbspeakr / top-level-domains.json
Created January 6, 2013 10:05
all Top-Level-Domains (TLD) and their corresponding countries/ generics in JSON
[
{
"model": "dmakr.domain",
"pk": 1,
"fields": {
"tld": "aero",
"country": "Air transport"
}
},{
"model": "dmakr.domain",
@wacko
wacko / gist:5577187
Last active January 6, 2024 07:31
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

@robmiller
robmiller / gist:5849541
Last active December 13, 2018 16:37
Quickly add Tim Pope's ctags generation scripts to all Git-controlled directories under the current one, so that you don't need to recreate your repositories.
# I love tpope's solution to ctags regeneration[1]; he creates
# a template from which all Git repositories take their default hooks,
# and then uses these hooks to regenerate ctags.
#
# [1]: http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html
#
# It's an elegant solution, but what do you do about repositories that
# already exist? The template will only apply to newly cloned or newly
# initialised repositories.
#
// Copyright 2013 Soundslice LLC. License: BSD.
/* HTML example: ****************
<figure class="vid">
<video preload>
<source src="/videos/help/playhead.mp4" type="video/mp4">
<source src="/videos/help/playhead.webm" type="video/webm">
</video>
<p>To move the playhead, click in the timeline or drag the playhead’s diamond.</p>
@bradley-holt
bradley-holt / calendar-of-tech-events.md
Last active December 22, 2015 20:28
A collection of community tech events in the greater Burlington area.
@sloria
sloria / bobp-python.md
Last active May 9, 2024 01:42
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
# http://www.gravityhelp.com/documentation/page/Web_API#Security
import time
import base64
import urllib
import requests
import json
import hmac
from hashlib import sha1
@RobertAudi
RobertAudi / ideavimrc
Created July 28, 2014 08:46
System clipboard support in IdeaVim
nnoremap yy "+yy
vnoremap y "+y
nnoremap p "+p
vnoremap p "+p
nnoremap P "+P
vnoremap P "+P