Skip to content

Instantly share code, notes, and snippets.

View brycemcd's full-sized avatar

Bryce McDonnell brycemcd

View GitHub Profile
@brycemcd
brycemcd / ansible_cheatsheet.md
Last active September 27, 2018 02:43
A smattering of frequently used commands I use. This will help prevent excessive load on Google's systems.

Ansible Cheatsheet

A smattering of frequently used commands I use. This will help prevent excessive load on Google's systems.

NOTE: most examples are copied and pasted from the documentation. Attribution belongs to the contributors of the documentation!

Template

http://docs.ansible.com/ansible/latest/template_module.html

@brycemcd
brycemcd / projects.md
Last active August 29, 2017 02:28
A brief listing of hobby projects I am attempting or would like to attempt

Hobby Projects

This serves as a repository of ideas that have popped into my head. As I have time, I play around with one.

  1. Mute Button - Automatically mute television commercials using machine learning and Spark
  2. NYC Taxi - A cabbie once told me that the length of each trip he takes is much longer than it was before. Use math to prove/disprove it. This data needs a lot of cleanup and profiling before it can be properly analyzed. NYC Taxi Data Cleanup Project
  3. Heart Rate Anomaly Detector - Automatically detect afib in the fitbit HR
  4. Picam Fun - Detect movements and objects from images work started here
  5. Listicle - Organize online articles for reading frontend [backend](https://github.com/brycemcd/email-l
@dsparks
dsparks / pretty_network.R
Created December 12, 2012 17:39
Graphing a subset of isDotR's Twitter ego net.
doInstall <- TRUE
toInstall <- c("sna", "igraph")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
adjacencyList <- read.csv("https://dl.dropbox.com/s/8wabcrtqxysp03u/Twitter_network.R.csv?dl=1")
head(adjacencyList)
adjacencyMatrix <- table(adjacencyList)
as.matrix(sort(rowSums(adjacencyMatrix))) # Out-degree
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active July 5, 2024 04:29
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@mshafrir
mshafrir / states_hash.json
Created May 9, 2012 17:05
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=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')
@langalex
langalex / upstream_rails_application_template.rb
Created March 6, 2009 19:49
upstream rails application template
# rails application template for generating customized rails apps
#
# == requires ==
#
# * rails 2.3+, rspec, cucumber, culerity (langalex-culerity gem), machinist
#
# == a newly generated app using this template comes with ==
#
# * working user registration/login via authlogic, cucumber features to verify that it works
# * rspec/cucumber/culerity for testing