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
# | |
# CPP Rakefile | |
# | |
EXEC = "square" # Your app executable | |
FLAGS = "-Wall -Wextra" # Flags for building | |
EXTRA = %w{ OpenCV } # Extra includes | |
# | |
# Nothing to see here, move along... | |
# |
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
#!/usr/bin/env ruby | |
chunk = ARGV.join | |
head, line = chunk.split("&line=") | |
trash, file = head.split("file://") | |
file = file.gsub!("%2F", "/") | |
args = `ps aux | grep emac[s]` == "" ? "c" : "" |
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
# | |
# Logstash conf! | |
# | |
input { | |
tcp { | |
host => "0.0.0.0" | |
port => 514 | |
type => syslog | |
} | |
udp { |
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
# | |
# Fix bootstrap tabs! Go back in F5/reload/etc | |
# | |
doc.on 'created', '.tab-fix', -> | |
hash = document.location.hash; | |
if (hash) | |
$(@).find("a[href='#{hash}']").tab('show') | |
for link in $(@).find('a') | |
do (link) -> |
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
# | |
# xConky settings | |
# | |
update_interval 2 | |
total_run_times 0 | |
net_avg_samples 1 | |
cpu_avg_samples 2 | |
imlib_cache_size 0 |
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 'log4r' | |
require 'log4r/outputter/syslogoutputter' | |
require 'resque/failure/multiple' | |
require 'resque/failure/redis' | |
module Resque | |
module Failure | |
class Syslog < Base | |
# Define your logger, change as needed. |
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
(type.ps) runlibfile | |
(unit.ps) runlibfile | |
(IsoLatin.enc) runlibfile | |
/default_encoding IsoLatin def | |
<< /Duplex false /Tumble false >> setpagedevice | |
/pagesize [595 842] def | |
/margin 3 dict def margin begin /top 1 cm def /right 1 cm def /bottom 1 cm def /left 1 cm def end | |
(paper.ps) runlibfile | |
[ /Producer (Ruby Ghostscript - RGhost v0.8.7) /DOCINFO pdfmark /rows_per_page 80 def /count_pages 10 def /row_height 0.4 cm def /row_padding 0.1 cm def (basic.ps) runlibfile | |
(cursor.ps) runlibfile |
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
main() | |
int x = 1; | |
float y = 22.5; | |
char c = 'C'; | |
char[] = "Take this " + c + "!"; | |
printf("x to i: %d\n", x); |
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 'mongoid' | |
Mongoid.configure do |config| | |
config.master = Mongo::Connection.new.db("foo_#{Time.now.to_i}") | |
end | |
class Project | |
include Mongoid::Document | |
field :name | |
field :state, :default => 'active' |
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 'spork' | |
Spork.prefork do | |
ENV['RAILS_ENV'] ||= 'test' | |
require 'rails/application' | |
Spork.trap_method(Rails::Application::RoutesReloader, :reload!) | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'database_cleaner' |