Skip to content

Instantly share code, notes, and snippets.

@pibby
pibby / dotfiles.sh
Created February 18, 2014 01:55
Dotfiles backup on Linux
#!/bin/sh
## Backup dotfiles and commit to git
## by Katie Harron - @pibby
date=`date "+%Y-%m-%d %H:%M:%S"`
dest=~/dotfiles
cd ~
cp -r .fluxbox/ $dest/fluxbox/
cp -r .irssi/ $dest/irssi/
@pibby
pibby / screencap-responsive-firefox
Last active August 29, 2015 13:57
Using watir-webdriver, take screenshots in Firefox of a responsive website entered by the user at different breakpoints
#!/usr/bin/ruby
# Katie Harron - @pibby
# Use Firefox to take screen captures of a responsive website at multiple breakpoints, ask the user to input the URL
require 'watir-webdriver'
puts "Enter URL to capture: "
site = gets.chomp()
mq = [320,480,640,768,1024,1280,1440]
@pibby
pibby / screencap-responsive-local-safari
Last active August 29, 2015 13:57
Using selenium, take screenshots in Safari of a responsive website running on a local python simple server at different breakpoints
#!/usr/bin/ruby
# Katie Harron - @pibby
require 'selenium-webdriver'
mq = [320,480,640,768,1024,1280,1440]
driver = Selenium::WebDriver.for :safari
driver.get 'http://localhost:8000'
@pibby
pibby / screencap-responsive-local-firefox
Last active August 29, 2015 13:57
Using selenium, take screenshots in Firefox of a responsive website running on a local python simple server at different breakpoints
#!/usr/bin/ruby
# Katie Harron - @pibby
require 'watir-webdriver'
mq = [320,480,640,768,1024,1280,1440]
b = Watir::Browser.new :firefox
b.goto 'http://localhost:8000'
@pibby
pibby / screencap-responsive-local-google-chrome
Last active August 29, 2015 13:57
Using watir-webdriver, take screenshots in Google Chrome of a responsive website running on a local python simple server at different breakpoints
#!/usr/bin/ruby
# Katie Harron - @pibby
require 'watir-webdriver'
mq = [320,480,640,768,1024,1280,1440]
b = Watir::Browser.new :chrome
b.goto 'http://localhost:8000'
From eccc80a754273641c2e0532be98987c8e89e960e Mon Sep 17 00:00:00 2001
From: root <root@nexus.frozenliquid.net>
Date: Fri, 28 Jun 2013 20:38:12 +0400
Subject: [PATCH] ufw: Initial firewall config on OpenVZ VPS
* OpenVZ vps doesn't have all the kernel features needed by
Ubuntu 12.04 LTS, disable unsupported features so firewall
starts cleanly.
---
default/ufw | 4 ++--
@pibby
pibby / tmux.md
Created March 29, 2014 22:49 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@pibby
pibby / README
Created April 13, 2014 01:29 — forked from vangberg/README
# Deploying a Sinatra app to Heroku
## Database
The location of the database Heroku provides can be found in the environment
variable DATABASE_URL. Check the configure-block of toodeloo.rb for an example
on how to use this.
## Server
Heroku is serving your apps with thin, with means you have all your thin goodness available,
such as EventMachine.
@pibby
pibby / gitdeploy.md
Last active August 29, 2015 13:59 — forked from rmanalan/gitdeploy.md

My Git Deploy Workflow

I use this for static and simple [Sinatra][1] based sites -- great for prototyping simple apps. Credit goes to http://toroid.org/ams/git-website-howto for the original idea.

If you don't know what this is, here's an example of how I deploy my website/app to a server:

# create/update/delete files in my site
git add .
git commit -m "description of the changes I made"

git push

# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/