Skip to content

Instantly share code, notes, and snippets.

View cassidoo's full-sized avatar
⌨️
sleepy

Cassidy Williams cassidoo

⌨️
sleepy
View GitHub Profile
@cassidoo
cassidoo / State Picker
Created July 31, 2013 17:00
I didn't feel like ever having to make this again. An HTML U.S. State picker dropdown. You're welcome.
<select name="State">
<option value="" selected="selected">Select a State</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
@cassidoo
cassidoo / ParseProductsForSearching
Created August 9, 2013 23:45
If you have "product" JSON objects, you can use this to parse the title and search Amazon and Ebay.
var getResults = function(/*successResponse*/){
// Dummy data examples
var obj = [{
"title": "MICHAEL Michael Kors Women\u0027s 3/4 Double-Breasted Hooded Trench,Khaki,Medium",
"imagePath": "http://static8.superfish.com/images_np/shared/sys_v2/images/un/30-03-2011/un-pricegrabber24-03-2011_03-25- 20/_Request_1132/source_125/category_4230_UNIFIED_COATS_W/detail/342122213_342122259",
"internalId": "342122259",
"price": "175.00$",
"merchantName": "Amazon",
@cassidoo
cassidoo / Blogs
Created August 14, 2013 20:43
Blog platforms that I've been told are good
Medium
Ghost
Scotch https://github.com/techwraith/scotch
http://scriptogr.am
Anchor
https://github.com/mojombo/jekyll
@cassidoo
cassidoo / JekyllPostList
Created April 10, 2014 05:01
If you want a list of all of your posts in Jekyll, this is it.
<div id="home">
<h1>Blog Posts</h1>
<ul class="posts">
{% for post in site.posts %}
<li><span>{{ post.date | date_to_string }}</span> <br> <a href="{{ post.url }}" class="postname">{{ post.title }}</a></li>
{% endfor %}
</ul>
</div>
@cassidoo
cassidoo / branch_sync
Created December 26, 2014 21:30
Sync two branches in git
# Put in ~/.bash_profile
# Usage:
# > sync master gh-pages
# Equivalent to:
# > git push origin master
# > git checkout gh-pages
# > git rebase master
# > git push origin gh-pages
# > git checkout master
@cassidoo
cassidoo / polymerdemo.html
Last active August 29, 2015 14:14
polymerdemo
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
<style>
@cassidoo
cassidoo / checkbox
Created May 7, 2015 18:02
Style HTML Checkbox
<style>
input[type=checkbox] {
display: none;
}
input[type=checkbox] + label {
display: inline-block;
position: relative;
padding: 6px;
background-color: white;
# Bash Stuff
alias reload='source ~/.bash_profile'
alias a='echo "------------Your aliases------------";alias'
alias sa='source ~/.bash_profile;echo "Bash aliases sourced."'
alias bp='vim ~/.bash_profile'
# Install git completion here: brew install git bash-completion
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
# Git Stuff
@cassidoo
cassidoo / burrito
Last active November 19, 2016 05:47
Prompt: Write about your favorite memory with food
When I was a young child, about 5 or so, I dreamt of writing shows. I wanted to make my words on paper come to life on screen. I didn't even know how to write. But I had to try.
I started small, writing short stories about my socks or my gangster brothers. But I wanted more. I wanted to create something that would touch lives forever. But who was I? A 5-year-old suffering artist, struggling to get by? How could I stand out in the throngs of other authors and be who I truly was?
I had to write about something universal. I knew only my few friends and my family, who simply didn't understand me. Instead, I called a fellow artist in Brooklyn, Jay-Z. He gave me the best advice I could have asked for: "Leave it alone" (I couldn't tell if he said "it" or "me" but that was all I needed).
That was it. I needed to go specific. One, single thing.
I narrowed it down to food. Everyone eats. Everyone needs and wants food. It's the most basic desire and necessity we have. It's its own entity.
It was a genius plan. I wrote
@cassidoo
cassidoo / remove-node_modules
Created July 16, 2015 14:58
Remove node_modules from git
Add to .gitignore file
node_modules
Then call:
git rm -r --cached node_modules
git commit -m "Remove node_modules now that they're ignored!"
git push origin master