Skip to content

Instantly share code, notes, and snippets.

View TrevorS's full-sized avatar

Trevor Strieber TrevorS

View GitHub Profile
SCRIPT /home/vagrant/.vim/bundle/syntastic/plugin/syntastic/autoloclist.vim
Sourced 2 times
Total time: 0.000126
Self time: 0.000126
count total (s) self (s)
if exists("g:loaded_syntastic_notifier_autoloclist") || !exists("g:loaded_syntastic_plugin")
1 0.000001 finish
endif
1 0.000004 let g:loaded_syntastic_notifier_autoloclist = 1
SCRIPT /home/vagrant/.vim/bundle/syntastic/plugin/syntastic/autoloclist.vim
Sourced 2 times
Total time: 0.000071
Self time: 0.000071
count total (s) self (s)
if exists("g:loaded_syntastic_notifier_autoloclist") || !exists("g:loaded_syntastic_plugin")
1 0.000002 finish
endif
1 0.000003 let g:loaded_syntastic_notifier_autoloclist = 1
@TrevorS
TrevorS / create_zcs_database.sql
Created April 2, 2014 18:55
create_zcs_database.sql
CREATE DATABASE IF NOT EXISTS `zcs_production`;
USE `zcs_production`;
DROP TABLE IF EXISTS `zcs_counters`;
CREATE TABLE `zcs_counters` (
`id` int(255) NOT NULL,
`filename` varchar(255) DEFAULT NULL,
`call_switch` varchar(255) DEFAULT NULL,
`date_and_hour` datetime DEFAULT NULL,
`input` int(255) DEFAULT NULL,
class TestSwapBits {
public static String padLeft(String value, String padChar, int totalLength) {
StringBuilder sb = new StringBuilder();
if (value.length() < totalLength) {
int paddingRequired = totalLength - value.length();
for (int i = 0; i < paddingRequired; i++) {
sb.append(padChar);
}
}
@TrevorS
TrevorS / test.md
Last active August 29, 2015 13:58
  • Test
  • Test2
(1..100).each do |i|
message = ""
message += "Fizz" if i % 3 == 0
message += "Buzz" if i % 5 == 0
message = i if message == ""
puts message
end
@TrevorS
TrevorS / draw-out.txt
Last active August 29, 2015 13:59
drawmino output
leftDrawmino size before add: 0
addingLeftDrawmino: drawmino: 6, 6, flip: false
leftDrawmino size after add: 1
Drawing board
# of left drawminoes: 1
left drawmino: drawmino: 6, 6, flip: false
left, x: 256, y: 220, yflip: 191
# of right drawminoes: 0
Done drawing board
@TrevorS
TrevorS / ReplacedDisplayCode.java
Created April 15, 2014 15:30
replaced_display_code.java
p1.clearDrawminoes();
for (Dom d : g.getHand(0).getDoms()) {
p1.addDrawmino(new Drawmino(d));
}
p2.clearDrawminoes();
for (Dom d : g.getHand(1).getDoms()) {
p2.addDrawmino(new Drawmino(d));
}
namespace :db do
desc "Injects a Ciber file into the database."
task :load_ciber_data, [:file_name] => :environment do |t, args|
require 'csv'
records = []
CSV.foreach("#{args.file_name}", {:col_sep => "|", :headers => true}) do |row|
record = CiberRecord.new
class TestCurrency {
public static void main(String[] args) {
double myMoney = 1.03;
double moneyOwed = .42;
System.out.println("Money left over: " + (myMoney - moneyOwed));
}
}