This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The ppa will have the sources listed on it's site: https://launchpad.net/~gwendal-lebihan-dev/+archive/cinnamon-stable | |
# edit /etc/apt/sources.list | |
deb http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu quantal main | |
deb-src http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu quantal main | |
# Add signing key | |
wget "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0xA777609328949509" -O out && sudo apt-key add out && rm out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TODAY = Time.now.strftime("%Y-%m-%d") | |
USER = "MY_USER" | |
PICTURES_DIR = "/home/#{USER}/Pictures/national-geographic/" | |
TODAYS_PICTURE = "#{PICTURES_DIR}#{TODAY}-ngeo.jpg" | |
PROXY_HOST = 'proxy.example.net' | |
PROXY_PORT = 8443 | |
desc "Fetch National Geographic Photo of the Day" | |
task :get_photo_of_the_day do | |
# http://photography.nationalgeographic.com/photography/photo-of-the-day/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COLORTERM=gnome-terminal | |
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-6qbTLpVXel,guid=65fcd2c788d00cd94308487600000093 | |
DEFAULTS_PATH=/usr/share/gconf/gnome-fallback.default.path | |
DEFAULT_USER=me | |
DESKTOP_SESSION=gnome-fallback | |
DISPLAY=:0.0 | |
EDITOR=vim | |
FTP_PROXY=http://ftp://proxy.mycompany.net:8000/ | |
GDMSESSION=gnome-fallback | |
GDM_LANG=en_US |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set path to app that will be used to configure unicorn, | |
# note the trailing slash in this example | |
@dir = "/path/to/app/" | |
worker_processes 2 | |
working_directory @dir | |
timeout 30 | |
# Specify path to socket unicorn listens to, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this sets the user nginx will run as, | |
#and the number of worker processes | |
user nobody nogroup; | |
worker_processes 1; | |
# setup where nginx will log errors to | |
# and where the nginx process id resides | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.2.1 | |
RUN apt-get update -qq && apt-get install -y build-essential | |
RUN apt-get install -y libxml2-dev libxslt1-dev | |
RUN apt-get install -y libqt4-webkit libqt4-dev xvfb | |
RUN apt-get install -y nodejs | |
ENV APP_HOME /code | |
RUN mkdir $APP_HOME | |
WORKDIR $APP_HOME | |
ADD Gemfile* $APP_HOME/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cp /usr/share/applications/google-chrome.desktop ~/google-chrome.desktop.bak~ | |
sudo sed -i 's/\/usr\/bin\/google\-chrome\-stable/\/usr\/bin\/google\-chrome\-stable \-\-touch\-devices=123/g' /usr/share/applications/google-chrome.desktop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'webrat' | |
require 'webrat/core/matchers' | |
include Webrat::Methods | |
include Webrat::Matchers | |
Webrat.configure do |config| | |
config.mode = :mechanize | |
end | |
class MechanizeWorld < Webrat::MechanizeSession |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSError* error; | |
if(![managedObjectContext save:&error]) { | |
NSLog(@"Failed to save to data store: %@", [error localizedDescription]); | |
NSArray* detailedErrors = [[error userInfo] objectForKey:NSDetailedErrorsKey]; | |
if(detailedErrors != nil && [detailedErrors count] > 0) { | |
for(NSError* detailedError in detailedErrors) { | |
NSLog(@" DetailedError: %@", [detailedError userInfo]); | |
} | |
} | |
else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
for (int y=0; y<[selectedMonsters count];y++) { | |
if [[selectedMonsters objectAtIndex:y] isKindOfTemplate:[monsters objectAtIndexPath:indexPath]] { | |
cell.detailLabel.text = [monster quantity]; | |
} | |
else { | |
cell.detailLabel.text = ""; | |
} | |
} | |
} |
OlderNewer