Skip to content

Instantly share code, notes, and snippets.

View tylergaw's full-sized avatar

Tyler Gaw tylergaw

View GitHub Profile
Replace YOURCODEHERE with your code:
http://www.ticketweb.com/t3/sale/SaleEventDetailSubmit?dispatch=proceed&eventId=6580715&pl=webconcerts&view=list&promoCode=YOURCODEHERE&org.apache.struts.taglib.html.CANCEL=Apply+Access+Code
@tylergaw
tylergaw / gist:fc0ee6733a771e6ef568
Last active August 29, 2015 14:24
Boolean attributes halp
@tylergaw
tylergaw / gist:a00633db11fafaec88ce
Created June 12, 2015 16:47
Create an OS X App from a single javascript file

Dong some learnin' about the osacompile command for using JS to write OS X apps/applets/automations etc. If you're on Yosemite (or greater):

Safari CORs

This example works in Chrome and Firefox but will fail in Safari http://jsfiddle.net/9qxs5gdf/

Safari sends the origin header along with the first OPTIONS request. I'm wondering if the Dribbble API does not allow that header?

From Safari: Access-Control-Request-Headers accept, authorization, origin

Saw a similar issue here:

@tylergaw
tylergaw / Jribbble Shots Example 001.markdown
Created May 18, 2015 02:26
Jribbble Shots Example 001
@tylergaw
tylergaw / gist:310329da6173d215c8a0
Created April 26, 2015 20:34
Dribbble API CORs request standard XMLHttpRequest vs. jQuery $.ajax

I'm attempting to make CORs requests to the Dribbble API v1. I can do so using a standard XMLHttpRequest, but cannot using jQuery's $.ajax.

I'm trying to determine if I'm just doing something wrong with the jQuery request, if jQuery is doing something wrong, or if the Dribbble server is missing some bit of CORs configuration.

Here is a working example showing two different CORs requests: http://jsfiddle.net/thegaw/pec38u18/

One thing that is sticking out to me is that the jQuery request is setting the following header:

Access-Control-Request-Headers:accept, authorization
#!/bin/sh
git rev-parse 2>/dev/null
if [[ $? != 0 ]]
then
echo "Not a git repo"
return
fi
@tylergaw
tylergaw / gist:cd1f28f60a838c24aef8
Last active August 29, 2015 14:10
ember-cli generate controller with type option

I was trying to use nodegit and was running into trouble. I followed the install instructions on the README and then tried the examples there, but was getting errors for anything beyond requiring the package.

For now it seems you can't use the version of nodegit that is published to npm.

npm install nodegit

That will install version 0.1.4. Which seems to not work. Here's an example of what would happen.

@tylergaw
tylergaw / gist:5bb03e347371e733ac2e
Created September 24, 2014 02:48
I can't sourcemap

I'm trying to enable source maps for Sass on my site http://tylergaw.com.

If you go there and look at:

developer tools > sources > tylergaw.com > css > scss

you'll see modules and partials. Both of those directories have all the file names for the source files. If you click on any of them nothing will load. And if you hop over to the console you'll see that they a 404. That's because they do not exist on the server. That's my issue.

I'm using Jekyll to generate my site. When jekyll builds it copies the scss dir from src to public (my jekyll destination dir), but strips out all subdirectories. In this case modules and partials. For some reason it leaves the .scss file in there.