As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/env python2.6 | |
""" | |
A quick script to install into your `Application Support/BBEdit/Scripts` folder. | |
This runs PyFlakes (requires PyFlakes to be installed at `/usr/local/bin` - | |
try ``/usr/bin/easy_install-2.6 pyflakes==0.4.0``) and reformats the results | |
so that they show up in BBEdit's search results / error / warnings window. Then | |
the errors can be stepped through one at a time. | |
I've bound this to control-shift-V. You must save your Python file first before | |
running the check. |
As configured in my dotfiles.
start new:
tmux
start new with session name:
# Use git and git+ssh instead of https | |
[url "git://github.com/"] | |
insteadOf = https://github.com/ | |
[url "git@github.com:"] | |
pushInsteadOf = "git://github.com/" | |
[url "git@github.com:"] | |
pushInsteadOf = "https://github.com/" |
#!/usr/bin/env sh | |
# Download lists, unpack and filter, write to stdout | |
curl -s https://www.iblocklist.com/lists.php \ | |
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| xargs wget -O - \ | |
| gunzip \ | |
| egrep -v '^#' |
#XLarge DBInstanceClassMemory = 15892177440 = 14.8GB | |
#/32 = 496630545 = 473MB | |
#/64 = 248315272 = 236MB | |
#/128 = 124157636 = 118MB | |
#/256 = 62078818 = 59MB | |
#/512 = 31039409 = 29MB | |
#/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762 | |
#/25165760 = 623 # half of max_connections = 1993.6MB | |
#/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608 | |
#*(3/4) #default innodb pool size = 11922309120 |
#![feature(phase)] | |
#[phase(plugin, link)] extern crate log; | |
extern crate green; | |
extern crate rustuv; | |
use std::io; | |
use std::os; | |
use std::io::{Listener,Acceptor,TcpStream}; | |
#[start] |
use async::fs::File; | |
use async::io::Async; | |
fn copy(src: &Path, dst: &Path) -> impl Async<()> { | |
let src = try!(File::open(src)); | |
let dst = try!(File::create(dst)); | |
// Copy a kiB at a time. | |
let mut buffer = Vec::with_capacity(1024); | |
loop { |
use std::io::prelude::*; | |
use std::fs::File; | |
use std::io::{ Error, ErrorKind }; | |
fn open_file(path: &str) -> Vec<u8> { | |
let mut f = match File::open( path ) { | |
Ok(x) => x, | |
Err(e) => match e.kind() { | |
ErrorKind::NotFound => /*idk what you want to do*/, |