Skip to content

Instantly share code, notes, and snippets.

View tapickell's full-sized avatar
🌴
Just happy to be here

Todd Pickell tapickell

🌴
Just happy to be here
View GitHub Profile
@tapickell
tapickell / Gulpfile.js
Created February 16, 2016 01:46 — forked from Eunoia/Gulpfile.js
Deploy your wintersmith generated static site to amazon S3
var fs = require('fs');
var gulp = require('gulp');
var runWintersmith = require('run-wintersmith');
var s3 = require("gulp-s3");
var options = { headers: {'Cache-Control': 'public'} }
gulp.task('default', function() {
console.log('`gulp deploy` to deploy')
});
@tapickell
tapickell / gtav_stocks.rb
Last active September 19, 2015 04:17 — forked from edwardloveall/gtav_stocks.rb
Get stocks for the GTA V BAWSAQ
require 'net/http'
require 'json'
def request
Net::HTTP.get(URI('http://socialclub.rockstargames.com/games/gtav/ps4/bawsaq'))
uri = URI('http://socialclub.rockstargames.com/games/gtav/ajax/stockdetail')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri)
@tapickell
tapickell / code.js
Last active August 26, 2015 02:44 — forked from maxkfranz/code.js
Visual style
$(function(){ // on dom ready
$('#cy').cytoscape({
layout: {
name: 'cose',
padding: 10
},
style: cytoscape.stylesheet()
.selector('node')
@tapickell
tapickell / gist:a62a6c36b1f3026b4bec
Last active August 25, 2015 20:00 — forked from pjobson/remove_mcafee.md
OSX McAfee Removal
launchctl stop com.mcafee.menulet
launchctl stop com.mcafee.reporter
launchctl remove com.mcafee.menulet
launchctl remove com.mcafee.reporter
sudo su -
launchctl stop com.mcafee.virusscan.fmpd
launchctl stop com.mcafee.ssm.ScanManager
// Matthew McMillan
// @matthewmcmillan
// http://matthewcmcmillan.blogspot.com
//
// Digital speedometer
//
// VSS on car connects to pin 5
// CLK on display to Analog pin 5
// DAT on display to Analog pin 4
//
OPERANDS = {zero: 0, one: 1, two: 2, three: 3, four: 4, five: 5, six: 6, seven: 7, eight: 8, nine: 9}
OPERATIONS = {plus: :+, minus: :-, times: :*, divided_by: :/}
def self.method_missing(message, *args)
if is_target_message? message
process_message message, *args
else
super
end
end
Stupid Shit
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@tapickell
tapickell / urlGrabTags.rb
Last active December 21, 2015 03:19
get tags from website
#!/usr/bin/env ruby
require 'open-uri'
tags = []
outfile = File.open("tags.txt", "w")
open("http://ccis.edu") do |f|
f.each_line do |line|
if /[<]\w+/.match(line)
@tapickell
tapickell / about_scoring_project.rb
Created May 18, 2013 23:05
greed game after refactoring
class DiceParser
def initialize(dice)
@dice = dice
@singles = []
end
def parse
@groups = self.group_sets
self.split_groups_from_singles
return {:groups => @groups, :singles => @singles}
end