Atom automatic update by http://atom.io/packages/sync-settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fzf | |
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh | |
export FZF_DEFAULT_OPTS="--multi --reverse --border --inline-info --preview '([ -e {} ] && (head -20 {} || tree -C {} | head -20 ) || (echo {})) 2> /dev/null' --preview-window=right:40%:wrap" | |
export FZF_CTRL_R_OPTS="--no-preview" | |
export FZF_CTRL_T_OPTS="--bind 'ctrl-x:execute(subl -a {})'" | |
# fzf bindigs | |
bindkey '^P' fzf-file-widget |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<keymap version="1" name="Personal" parent="Default for XWin"> | |
<action id="BaseOnThisFunction" /> | |
<action id="CheckinProject" /> | |
<action id="CloseActiveTab"> | |
<keyboard-shortcut first-keystroke="shift ctrl w" /> | |
</action> | |
<action id="CloseContent"> | |
<keyboard-shortcut first-keystroke="ctrl w" /> | |
</action> | |
<action id="CompareTwoFiles" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const puppeteer = require('puppeteer'); | |
(async() => { | |
const browser = await puppeteer.launch({ | |
headless: true, | |
ignoreHTTPSErrors: true, | |
timeout: 1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $EUID != 0 ]; then | |
echo "You must be root to run this script" 1>&2 | |
exit 1 | |
fi | |
URL_RELEASES="https://github.com/atom/atom/releases/latest" | |
NEW_RELEASE=$(curl -sL $URL_RELEASES | egrep -o 'href="([^"#]+)atom-amd64.deb"' | cut -d'"' -f2 | sort | uniq) | |
NEW_VERSION=$(echo $NEW_RELEASE | egrep -o '[0-9]+\.[0-9]+\.[0-9]+') | |
CURRENT_VERSION=$(atom --version | fgrep Atom | awk '{print $3}') |
I hereby claim:
- I am aanton on github.
- I am aanton (https://keybase.io/aanton) on keybase.
- I have a public key ASDy6XVLDZ6WeKCLIJPiQziwfLE1D9XsZqlZxLtyjkMcmgo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
editor = vim | |
pager = less -r | |
[alias] | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --all --date=iso | |
local = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=iso | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$debug = []; | |
// Configure charset | |
$charsets = ['utf-8', 'iso-8859-1']; | |
$charset = array_key_exists('charset', $_REQUEST) && | |
in_array(mb_strtolower($_REQUEST['charset']), $charsets) ? mb_strtolower($_REQUEST['charset']) : 'utf-8'; | |
ini_set('default_charset', $charset); | |
mb_internal_encoding(ini_get('default_charset')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# List all keys stored in memcache. | |
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
# Forked from https://gist.github.com/bkimble/1365005 | |
require 'net/telnet' | |
headings = %w(id expires bytes cache_key) | |
rows = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @see https://github.com/pda/flexihash | |
* @see http://www.martinbroadhurst.com/Consistent-Hash-Ring.html | |
*/ | |
class ConsistentHash | |
{ | |
/** @var int Number of positions to hash each target. This has the effect of distributing the servers more evenly over the ring. Note that this has nothing to do with server replication */ | |
private $replicas; |
NewerOlder