Skip to content

Instantly share code, notes, and snippets.

View yesmeck's full-sized avatar
:octocat:
<img src="x" onerror="alert(1)" />

Wei Zhu yesmeck

:octocat:
<img src="x" onerror="alert(1)" />
View GitHub Profile
@JacksonTian
JacksonTian / gbk.js
Created February 17, 2014 07:58
utf8 => gbk
var fs = require('fs');
var iconv = require('iconv-lite');
// 这里是utf8
var str = '坑爹啊,都是国际项目了,编码居然还用gbk';
console.log(new Buffer(str).length);
// 转换成gbk
var encoded = iconv.encode(str, 'gbk');
@d11wtq
d11wtq / docker-ssh-forward.bash
Created January 29, 2014 23:32
How to SSH agent forward into a docker container
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
set :application, 'myapp'
set :repo_url, '[email protected]:blackxored/myapp'
set :rails_env, 'production'
set :rbenv_type, :system
set :rbenv_ruby, "2.0.0-p247"
set :deploy_to, '/data/apps/myapp'
set :deploy_via, :remote_cache
set :user, 'deploy'
set :password, nil
@julionc
julionc / 00.howto_install_phantomjs.md
Last active March 24, 2025 17:27
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@weynhamz
weynhamz / config
Last active March 6, 2025 11:21
i3-wm configuration
# i3 config file
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
#####
#
# Fonts
#
@afeld
afeld / gist:5704079
Last active April 21, 2025 15:11
Using Rails+Bower on Heroku
@itspriddle
itspriddle / setup-git-bundler-merge-driver
Last active August 13, 2018 08:41
This script makes git automatically run `bundle install` when a merge conflict with Gemfile.lock occurs. Run it once per project to setup `.gitattributes` and `.gitconfig`
#!/usr/bin/env bash
# Usage: setup-git-bundler-merge-driver
# Help: Configures git to use a custom merge driver to resolve Gemfile.lock
# merge conflicts.
if [ ! -f Gemfile ]; then
echo 'No `Gemfile` found! Aborting'
exit 1
fi
@sjmulder
sjmulder / lostfound.rb
Created November 7, 2012 14:14
Quickly search through a reflog
#!/usr/bin/ruby
# Some bash-fu should be able to do the same but I'm only a white belt
if ARGV.length < 1
$stderr.puts 'usage: lostfind <keyword> [<keyword> ...]'
else
reflog = `git reflog`
reflog.each_line do |line|
hash, _, message = line.split(' ', 3)