Skip to content

Instantly share code, notes, and snippets.

View hzhu's full-sized avatar
🍵
building matcha.xyz

henryzhu.eth hzhu

🍵
building matcha.xyz
View GitHub Profile
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 23, 2024 19:59
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@burin
burin / gist:3840737
Created October 5, 2012 16:06
Full screen web app in iPhone 5 (save to home screen)
<!-- standard viewport tag to set the viewport to the device's width
, Android 2.3 devices need this so 100% width works properly and
doesn't allow children to blow up the viewport width-->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" />
<!-- width=device-width causes the iPhone 5 to letterbox the app, so
we want to exclude it for iPhone 5 to allow full screen apps -->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" />
<!-- provide the splash screens for iPhone 5 and previous -->
<link href="assets/splashs/splash_1096.png" rel="apple-touch-startup-image" media="(device-height: 568px)">
<link href="assets/splashs/splash_iphone_2x.png" rel="apple-touch-startup-image" sizes="640x960" media="(device-height: 480px)">
@endolith
endolith / export_google_starred_locations.py
Created October 16, 2012 02:29
Export Google Maps starred locations
# -*- coding: utf-8 -*-
"""
Go to Google Bookmarks: https://www.google.com/bookmarks/
On the bottom left, click "Export bookmarks": https://www.google.com/bookmarks/bookmarks.html?hl=en
After downloading the html file, run this script on it to generate a KML.
"""
@sean-roberts
sean-roberts / ImmutableVsMutable.js
Last active May 26, 2020 19:09
Immutable vs Mutable in JS - the immutable (unable to change or mutate) values are primitive values - numbers, strings, booleans, null, undefined). While the mutable are all other objects. They are generally referred to as reference types because the object values are references to the location, in memory, that the value resides.
// start with at string
var s = "my string";
//change its value (remember this changing of value is by value not reference)
s.toUpperCase();
// assign it to t
var t = s;
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
(function() {
var Stripe, exports, key, _i, _len,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
_this = this;
this.Stripe = (function() {
function Stripe() {}
@andre3k1
andre3k1 / scala_installer.sh
Created August 1, 2013 01:24
Install Scala and add it to your machine's PATH environment variable. This script is compatible with all Unix-like machines.
#!/bin/sh
export SCALA_VERSION=2.9.2 # This is the only configuration setting
sudo curl -O http://www.scala-lang.org/files/archive/scala-$SCALA_VERSION.tgz
sudo tar -zxf scala-$SCALA_VERSION.tgz
sudo rm -rf scala-$SCALA_VERSION.tgz
sudo mv scala-$SCALA_VERSION /usr/local
sudo ln -s /usr/local/scala-$SCALA_VERSION/bin/scala /usr/bin/scala
sudo ln -s /usr/local/scala-$SCALA_VERSION/bin/scalac /usr/bin/scalac
sudo ln -s /usr/local/scala-$SCALA_VERSION/bin/fsc /usr/bin/fsc
sudo ln -s /usr/local/scala-$SCALA_VERSION/bin/sbaz /usr/bin/sbaz
@spadgos
spadgos / gist:8097529
Last active March 22, 2021 21:28
Basic rebase and merge flow

Merging feature branches with rebase:

  1. git checkout master
  2. git pull --rebase to make sure you have the latest version of master
  3. git checkout feature/my-branch
  4. git rebase master ... to rebase this branch from master
    1. Optionally, git push --force to update the branch on github. This is useful for making sure it closes a pull request properly.
  5. git checkout master
  6. git merge --no-ff feature/my-branch ... merge the branch into master, making sure there's a merge commit
@dweinstein
dweinstein / Dockerfile
Created March 14, 2014 15:37
testProject
FROM ubuntu
MAINTAINER David Weinstein <david@bitjudo.com>
# install our dependencies and nodejs
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install python-software-properties git build-essential
RUN add-apt-repository -y ppa:chris-lea/node.js
RUN apt-get update
RUN apt-get -y install nodejs