Skip to content

Instantly share code, notes, and snippets.

View caseywatts's full-sized avatar
Hi, I’m Casey!

Casey Watts caseywatts

Hi, I’m Casey!
View GitHub Profile
@caseywatts
caseywatts / fizzbuzz.rb
Last active February 28, 2016 18:09
Fizzbuzz
def fizzbuzz(x)
# your
# code
# goes
# here
puts "(change me I am a placeholder string)"
end
@caseywatts
caseywatts / Cloud 9 Static Content README.md
Last active November 1, 2016 17:37
Cloud 9 - Static Content

Cloud 9 - Static Content

Setting Up Cloud9

  • Go to c9.io and log in
  • Create a new workspace
    • Workspace name = practice-static-site
    • Clone from Git or Mercurial URL = https://gist.github.com/f4f1dc512ffdce293aa1.git
    • (everything else at defaults)

Look around

@caseywatts
caseywatts / Gemfile
Last active February 19, 2020 21:23
Sinatra on Cloud9
source 'https://rubygems.org'
gem 'sinatra'
gem 'sinatra-contrib'
@caseywatts
caseywatts / InstallNokogiriPlease.sh
Last active June 8, 2016 22:34
Nokogiri on OS X 10.10, Nov 2015
gem install nokogiri -v '1.6.6.2' -- --use-system-libraries --with-xslt-dir=/usr/local/opt/libxslt --with-iconv-dir=/usr/local/opt/libiconv --with-xml2-dir=/usr/local/opt/libxml2 --with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config --with-xml2-include=/usr/local/opt/libxml2/include/libxml2 --with-xslt-config=/usr/local/opt/libxslt/bin/xslt-config
gem install nokogumbo -v '1.4.1' -- --use-system-libraries --with-xslt-dir=/usr/local/opt/libxslt --with-iconv-dir=/usr/local/opt/libiconv --with-xml2-dir=/usr/local/opt/libxml2 --with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config --with-xml2-include=/usr/local/opt/libxml2/include/libxml2 --with-xslt-config=/usr/local/opt/libxslt/bin/xslt-config
@caseywatts
caseywatts / svg_to_png.js
Last active May 3, 2016 13:03
convert svg to png inline
// modified from answers on http://stackoverflow.com/questions/5433806/convert-embedded-svg-to-png-in-place
// Takes an SVG element as target
function svg_to_png_data(target) {
var ctx, mycanvas, svg_data, img, child;
// Construct an SVG image
var new_width = target.width.baseVal.valueInSpecifiedUnits;
var new_height = target.height.baseVal.valueInSpecifiedUnits;
@caseywatts
caseywatts / 0tableOfContents.dot
Last active October 9, 2015 15:21
Intro to Graphviz
digraph {
1 -> "Simple Nodes" ->
"http://graphviz-repl.herokuapp.com/intro-to-graphviz-1"
2 -> "Attributes = Lables, Colors, Styles" ->
"http://graphviz-repl.herokuapp.com/intro-to-graphviz-2"
3 -> "Subgraphs" ->
"http://graphviz-repl.herokuapp.com/intro-to-graphviz-3"
@caseywatts
caseywatts / meetup site jekyll.md
Last active November 1, 2016 17:39
How To: Tech Meetup Jekyll Site

How to make a meetup site quickly

Set up Jekyll

If you haven't before, make your own Jekyll site first to understand how it works and what the pieces are. Last time I made one, this is what I had to do:

Install Jekyll

gem install jekyll
jekyll new
@caseywatts
caseywatts / README.md
Last active August 29, 2015 14:23
dancing & gender roles

You can paste the contents of the .dot file into something like this (auto-reloads nicely but goes down sometimes) or this (not as pretty but breaks less).

@caseywatts
caseywatts / index.html
Last active August 29, 2015 14:17
whoiscc
<html>
<body>
<a onclick="window.external.AddSearchProvider('https://gist.githubusercontent.com/caseywatts/c385e6c7fc3e8d923093/raw/7d0c69332ea7c9ae4490f55a3d2c71f9b99403cd/whois-cc.xml');" href="#">Add Continuity Control Directory Search By Name</a>
</body>
</html>
@caseywatts
caseywatts / slugify-for-pivotal-install.md
Last active June 10, 2017 17:47
Slugify Pivotal Ticket Name (for git branch name)