Skip to content

Instantly share code, notes, and snippets.

View chancez's full-sized avatar

Chance Zibolski chancez

View GitHub Profile
sbl() {
local files
files=$(cat /Users/chance/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/FileHistory.json |
jq -r '.[] | .closed[], .opened[] | .filename' |
while read line; do
[ -f "${line/\~/$HOME}" ] && echo "$line"
done | fzf -d -m -q "$*" -1) && subl ${files//\~/$HOME}
}
~/projects/hamper  ± dockerfile  docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c880904a6746 chance/hamper:latest /usr/bin/supervisord 7 seconds ago Up 6 seconds 0.0.0.0:49160->22/tcp insane_torvalds
cae2c6875a64 4816d17dff31 /bin/sh -c pip insta 17 seconds ago Up 16 seconds lonely_ritchie
~/projects/hamper  ± dockerfile  ssh -v root@localhost -p 49160
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/chance/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to localhost [127.0.0.1] port 49160.
#!/usr/bin/env python2
from setuptools import setup, find_packages
from hamper import version
requires = open('requirements.txt').read().split('\n')
for i, dep in enumerate(requires):
if 'psycopg' in dep:
del requires[i]
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<time.h>
char inputChar()
{
// TODO: rewrite this function
return ' ';
}
200000: 646:int adventurer_effect(int currentPlayer, struct gameState *state){
-: 647: int cardDrawn;
200000: 648: int drawntreasure=0;
-: 649: int temphand[MAX_HAND];
200000: 650: int z = 0; // this is the counter for the temp hand
863581: 651: while(drawntreasure<2){
branch 0 taken 70%
branch 1 taken 30% (fallthrough)
463581: 652: if (state->deckCount[currentPlayer] <1){ //if the deck is empty we need to shuffle discard and add to deck
branch 0 taken 33% (fallthrough)
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.hostname = "chefbox"
config.vm.box = "opscode-ubuntu-12.04"
config.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box"
config.vm.network :private_network, ip: "33.33.33.10"
# config.vm.synced_folder "../data", "/vagrant_data"
~/projects/chef-repo  ± master  vagrant provision
[Berkshelf] Uploading cookbooks to 'https://api.opscode.com/organizations/chance'
[Berkshelf] Installing vps (0.1.0) from git: 'git://github.com/ecnahc515/vps_cookbook.git' with branch: 'master' at ref: 'f95c811545520edc64d1f9209bcee2f925ed69c8'
[Berkshelf] Using git (2.9.0)
[Berkshelf] Using dmg (2.1.4)
[Berkshelf] Using build-essential (1.4.2)
[Berkshelf] Using windows (1.12.8)
[Berkshelf] Using chef_handler (1.1.4)
[Berkshelf] Using runit (1.5.8)
[Berkshelf] Using yum (3.0.6)
function fullScreenImage(e) {
Ti.API.info('[fullScreenImage] event: ' + JSON.stringify(e));
var win = Ti.UI.createWindow({
name: 'imageWindow'
});
var image = Ti.UI.createImageView({
image: e.image,
<?php
if (isset($_POST)) {
$data = $_POST['blah blah'];
db.query("some sql to insert data", data);
}
$results = db.query('some sql query to get results')
?>
<html>