Skip to content

Instantly share code, notes, and snippets.

View mofelee's full-sized avatar
🎯
Focusing

mofelee

🎯
Focusing
View GitHub Profile
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@baopham
baopham / Monaco for Powerline.otf
Last active April 16, 2023 03:57
Patched font Monaco for OSX Vim-Powerline
class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private
@TooTallNate
TooTallNate / repl-client.js
Created March 26, 2012 20:09
Running a "full-featured" REPL using a net.Server and net.Socket
var net = require('net')
var sock = net.connect(1337)
process.stdin.pipe(sock)
sock.pipe(process.stdout)
sock.on('connect', function () {
process.stdin.resume();
process.stdin.setRawMode(true)
@doches
doches / reference.lua
Created March 27, 2012 19:47
Lua Cheat Sheet
-- Lua Cheat Sheet for Programmers, by Al Sweigart http://coffeeghost.net
-- This cheat sheet is an executable Lua program.
--[[ This is
a multline comment]]
---[[ This is a neat trick. The first -- makes -[[ not a multiline comment.
print("This line executes.")
--]] The rest of this line is also a comment.
print("Here is a string" .. ' concatenated with ' .. 2 .. ' other strings.')
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@hSATAC
hSATAC / mitmproxy.py
Created August 9, 2012 03:36
How to modify http request host and port using mitmproxy script
def request(context, flow):
if "miiicasa.com" in flow.request.host:
if flow.request.scheme == "https":
flow.request.host = "192.168.254.9"
flow.request.port = "50113"
if flow.request.scheme == "http":
flow.request.host = "192.168.254.9"
flow.request.port = "50110"
@sartak
sartak / a.md
Last active March 22, 2024 22:16
Anki 2 annotated schema
@wendal
wendal / gist:4537679
Created January 15, 2013 10:08
演示golang转编码 (gb2312 --> utf8)
package main
import (
iconv "github.com/djimenez/iconv-go"
"io/ioutil"
"log"
"net/http"