Skip to content

Instantly share code, notes, and snippets.

@pjschreifels
pjschreifels / buttons.coffee
Created February 2, 2013 21:01 — forked from mathias/buttons.coffee
#social-buttons #coffeescript Facebook and Twitter social media buttons using coffeescript for rails projects.
((d, s, id) ->
js = undefined
fjs = d.getElementsByTagName(s)[0]
return if d.getElementById(id)
js = d.createElement(s)
js.id = id
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"
fjs.parentNode.insertBefore js, fjs
) document, "script", "facebook-jssdk"
@pjschreifels
pjschreifels / google.analytics.js.coffee
Created February 4, 2013 06:11 — forked from rezwyi/google.analytics.js.coffee
#analytics #coffeescript Google Analytics code in coffeescript for rails projects.
# See http://stackoverflow.com/questions/4214731/coffeescript-global-variables
root = exports ? this
root._gaq = [['_setAccount', 'UA-xxxxxxxx-y'], ['_trackPageview']]
insertGAScript = ->
ga = document.createElement 'script'
ga.type = 'text/javascript'
ga.async = true
proto = document.location.protocol
@pjschreifels
pjschreifels / app.html
Last active October 23, 2016 17:36 — forked from jdanyow/app.html
Aurelia Validation Demo with Radio Button
<template>
<require from="./registration-form"></require>
<registration-form></registration-form>
</template>
@pjschreifels
pjschreifels / app.html
Last active August 26, 2018 11:31 — forked from jdanyow/app.html
Base Aurelia app for gist.run with [email protected] and Font Awesome.
<template>
<h1>${message}</h1>
</template>
@pjschreifels
pjschreifels / app.html
Created December 15, 2016 20:35 — forked from TylerJPresley/app.html
Select all trigger for checked.bind values.
<template>
<require from="./page"></require>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<page></page>
</div>
</div>
</div>