Skip to content

Instantly share code, notes, and snippets.

View meatcar's full-sized avatar

Denys Pavlov meatcar

View GitHub Profile
@meatcar
meatcar / gist:3250430
Created August 3, 2012 18:57
manualy capitalize words
infile = open('test.txt', 'rt')
wordlist = []
while True:
line = infile.readline()
if not line:
break
answer = line.split('=')
wordlist.append([answer[0], answer[1][0:-1]])
for word in wordlist:
" gist settings --------------------------------------------------------
let g:gist_clip_command = 'xclip -selection clipboard'
let g:gist_detect_filetype = 1
let g:gist_open_browser_after_post = 1
let g:gist_browser_command = 'google-chrome %URL% &'
// Version 1
var view = new view({
initialize: function () {
this.html(this.template({}));
this.partview = new PartView({
el: this.$('.class-part1')
});
this.partview2 = new PartView({
el: this.$('.class-part2')
});
#!/bin/sh
cd ..
GIT_DIR='.git'
umask 002 && git reset --hard
def test_blah_blah_blah():
def has_unfollow(driver):
btn =
return btn.text == 'Unfollow'
config.util.wait_assert(has_unfollow)
config.util.wait_assert(lambda driver:
profile.find_element_by_css_selector('.vf-subscribe').text == 'Unfollow')
#!/bin/bash
###
#
# In order for this to work, tuned your firewall for the following:
#
# 7000-7001
# 1024 - 65535
# 7199 TCP
# 8012 TCP
define([
"backbone",
"lodash"],
function(Backbone, _) {
var oldSync = Backbone.sync;
var methodMap = {
'create': 'POST',
'update': 'PATCH', // must use patch because put acts like post ATM
@meatcar
meatcar / .vimrc
Created May 29, 2013 02:37
ctrl-p replacement with Unite.vim
" ctrl-p replacement --------------------------------------------
nno <leader>t :<C-u>Unite file_mru file_rec/async:! -start-insert -buffer-name=files<CR>
nno <leader>cd :<C-u>Unite directory_mru directory -start-insert -buffer-name=cd -default-action=cd<CR>
@meatcar
meatcar / UofT
Created November 18, 2013 21:39
Descritpion='UofT wifi'
Interface=wlp1s0
Connection=wireless
Security=wpa-configsection
IP=dhcp
WPAConfigSection=(
'ssid="UofT"'
'key_mgmt=WPA-EAP'
'eap=PEAP'
'phase1="peapelabel=0"'
@meatcar
meatcar / gist:7609881
Created November 23, 2013 02:08
CDF Wolves
greywolf:~ $ cat /etc/hosts | grep wolf.cdf
#128.100.31.102 airwolf airwolf.cdf
128.100.31.198 greywolf.cdf.toronto.edu greywolf greywolf.cdf vncsrv1
128.100.31.200 werewolf.cdf.toronto.edu werewolf werewolf.cdf comp1srv
128.100.31.201 seawolf.cdf.toronto.edu seawolf seawolf.cdf comp2srv
128.100.31.202 skywolf.cdf.toronto.edu skywolf skywolf.cdf
128.100.31.203 redwolf.cdf.toronto.edu redwolf redwolf.cdf