Skip to content

Instantly share code, notes, and snippets.

View jschmid1's full-sized avatar

Joshua Schmid jschmid1

View GitHub Profile
@jschmid1
jschmid1 / vimrrc
Created January 27, 2015 10:31
vimrc
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'airblade/vim-gitgutter'
Plugin 'bling/vim-airline'
## dkeg 2013;i3 config file (v4) ##
exec setxkbmap us
exec setxkbmap -option ctrl:nocaps
exec xset m 1.3 0
exec xchat
#exec plasma-windowed org.kde.networkmanagement
exec feh --bg-fill ~/.i3/wallpaper.jpg
exec sh /home/jxs/.screenlayout/3mon.sh
exec owncloud
exec gajim
#!/bin/sh
# Send the header so that i3bar knows we want to use JSON:
echo '{"version":1}'
# Begin the endless array.
echo '['
# We send an empty first array of blocks to make the loop simpler:
echo '[],'
out_to_x no
own_window no
out_to_console yes
background no
max_text_width 0
# Update interval in seconds
update_interval 1.0
# This is the number of times Conky will update before quitting.
#!/bin/bash
# Copyright (c) 2013-2014 Artem Shinkarov <artyom.shinkaroff@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
require 'fileutils'
dir = '/mnt'
def write_file(size_in_mb, dir)
File.open("#{dir}/file-#{rand(100000)}.txt", 'w') do |f|
contents = "x" * (1024*1024)
size_in_mb.times { f.write(contents) }
end
end
@jschmid1
jschmid1 / hib_sus_testing
Created February 17, 2015 11:45
s3 / s4 testing
#!/bin/sh
dir=/var/tmp
log=$dir/test_hib.log
if [ x`id -u` != x0 ] ; then
echo "call as root!"
exit 1
fi
@jschmid1
jschmid1 / gist:88db7657836c84d481d0
Created July 26, 2015 10:55
tw stream selector
#!/usr/bin/ruby
require 'kappa'
games = []
Twitch.games.top(:limit => 10) {|game| games.push(game.name)}
games_hash = Hash[(1...games.size).zip games]
games_hash.each do |k,v|
puts "#{k}: #{v}"
end
import urwid
import logging
logging.basicConfig(filename='example.log',level=logging.DEBUG)
class ClusterLayout(object):
def __init__(self):
pass
import logging
import yaml
from salt.client import LocalClient
from salt.exceptions import SaltClientError
log = logging.getLogger(__name__)
def ext_pillar(minion_id, pillar, *args, **kwargs):
my_pillar = {'drive_group': {}}