Skip to content

Instantly share code, notes, and snippets.

@olivierlacan
olivierlacan / launch_sublime_from_terminal.markdown
Created September 5, 2011 15:50
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active December 11, 2025 14:31
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ssstonebraker
ssstonebraker / sed cheatsheet
Created August 2, 2013 14:06 — forked from un33k/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@usmanakram232
usmanakram232 / FinalProjectOnLearning.md
Last active January 9, 2020 13:28
'Learning How to Learn' by Dr. Barbara Oakley #coursera

A framework for efficent learning.

I procrastinate, hate repetitions and tests. I know that is very bad.

The fact that, I started this course to procrastinate from actually working on my thesis and learning a Functional programming (FP) is quite amusing. As, this course helped me a lot in understanding the process of learning and how to deal with procrastination without using too much of will power. I feel writing thesis is quite difficult, as I have to defend it and learning FP which is much different at conceptual level from imperative and object-oriented programing paradigms. So, I wanted to apply some of the techniques, I learnt in 'Learning How to Learn' and avoid the identified problem in my learning style. I would write the cycle of learning, as I approach it now.

Procastination (Task Lists & Eating the Forgs

@vasanthk
vasanthk / System Design.md
Last active December 12, 2025 09:39
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@rms1000watt
rms1000watt / python-extract-after-scrape.py
Created July 13, 2016 15:31
Python script to extract phone numbers and emails from html pages that were web scraped
import re
import glob
def main():
outputFile = 'output.tsv'
files = glob.glob('*.html')
print "Extracting from %s files" %(len(files))
data = []
@cyhsutw
cyhsutw / MathJax.ipynb
Last active October 20, 2025 06:05
Grabbed from https://github.com/odewahn/ipynb-examples, converted to v3 for GitHub to render.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@florida
florida / README.md
Last active December 26, 2019 07:52
Fish Rainbow
@DavisVaughan
DavisVaughan / pyarrow-python-r.r
Last active April 28, 2018 17:01
Exploring Apache Arrow with pyarrow and reticulate
library(reticulate)
pa <- import("pyarrow", convert = FALSE)
# Create a list of pyarrow arrays
# this is our data, each array will become a column, but isn't quite one yet
# notice it doesn't even have a column name. they are kind of like vectors
data <- list(
pa$array(list(1,2,3,4)),
pa$array(list("foo", "bar", "baz", "hi")),
pa$array(list(TRUE, TRUE, FALSE, TRUE))
@lovemecomputer
lovemecomputer / greeting.sh
Last active August 12, 2018 21:12
rainbow greeting
# my personal implementation of @florida's https://gist.github.com/florida/1839b047792b2d58f208a0913d4b2a6e
# DEPENDENCIES:
# - `lolcat` is the gradienterizer: https://github.com/busyloop/lolcat
# SETUP:
# this file (greeting.sh) is in ~/bin
# my .bash_profile includes this line to make all scripts in ~/bin globally accesscible:
# - `export PATH=$PATH:~/bin`
# at the end of .bash_profile, it includes the line