Skip to content

Instantly share code, notes, and snippets.

@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@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
@sr
sr / Gemfile
Created December 19, 2011 13:55
Janky on Heroku
source "http://rubygems.org"
gem "janky", "~>0.9"
gem "pg"
gem "thin"

開源之道

Original transcript: http://allisonrandal.com/2012/04/15/open-source-enlightenment/

這幾年來,我慢慢覺得,我們參與開源社群,就像是在一條道路上並肩而行:這不僅讓我們成為更好的程式設計者,也讓我們通過與人合作,而成為更好的人。

您可以將它想成一條修行之道,讓身而為人的我們能夠不斷成長。接下來,我想談談我對開源世界的個人觀點,希望能與您分享。

首先,人是一切開源專案的核心。程式碼是很重要,但最核心的永遠是人。

@letoh
letoh / gist:2790559
Last active March 13, 2024 07:23
[筆記] 為什麼在 x86,MBR 會被載入到 0x7C00?(完全版)

原文 Assembler / なぜx86ではMBRが"0x7C00"にロードされるのか?(完全版)

感謝 descent 大大分享本文,隨便看隨便譯。本文不是逐句譯,同時也不是這方面的專家 (不管是語言或技術),用語不一或缺漏錯誤在所難免,歡迎自行 fork 修正指教

誰適合看本文?

對 x86 架構與組合語言有基礎認識,以及從 MBR 到載入 OS 這一段過程有興趣的人 (還有談到中斷向量或 INT xxx 時不會一臉茫然的人)

@Nurdok
Nurdok / python_conversion.md
Last active December 16, 2022 03:45
Python Conversion

Python Number Conversion Chart

From To Expression
@dctrwatson
dctrwatson / JenkinsDiffEventListener.php
Last active January 11, 2020 22:56
Jenkins Phabricator Inegration
<?php
/*
* Copyright 2013 Disqus, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@jdkanani
jdkanani / notepad.html
Last active April 6, 2024 17:09 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@crabtw
crabtw / cmake.scan.sh
Created March 26, 2013 05:35
cross scan-build wrappers
#!/bin/sh
TARGET="mips-unknown-linux-uclibc"
TOOLCHAIN_PATH="$HOME/x-tools/$TARGET"
SYSROOT="$HOME/sysroot/$TARGET"
SCAN_BUILD_DIR="$HOME/src/llvm-svn/tools/clang/tools/scan-build"
SCAN_BUILD_CC="$HOME/bin/$TARGET-clang"
SCAN_BUILD_CXX="$HOME/bin/$TARGET-clang++"
SCAN_BUILD_OUT="analysis"
@willurd
willurd / web-servers.md
Last active May 4, 2024 07:22
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000