Consider this blog post model:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SOME_SETTING = 'some value' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'path-to-Stripe.php'; | |
if ($_POST) { | |
Stripe::setApiKey("YOUR-API-KEY"); | |
$error = ''; | |
$success = ''; | |
try { | |
if (!isset($_POST['stripeToken'])) | |
throw new Exception("The Stripe Token was not generated correctly"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note that while this file is in our config folder, it is | |
# symlinked to our site folders, so paths are relative from there | |
# Require gems and Compass plugins | |
# require 'rgbapng' | |
# require 'compass-fancybox-plugin' | |
require 'compass-growl' | |
# General | |
output_style = :expanded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let g:tagbar_type_php = { | |
\ 'ctagstype' : 'php', | |
\ 'kinds' : [ | |
\ 'i:interfaces', | |
\ 'c:classes', | |
\ 'd:constant definitions', | |
\ 'f:functions', | |
\ 'j:javascript functions:1' | |
\ ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
watchmedo shell-command --patterns="*.less" --command=\ | |
'LESS=`echo "${watch_src_path}" | sed s/.less/.css/`; \ | |
echo compile: "${watch_src_path}";\ | |
lessc "${watch_src_path}" "${LESS}"; \ | |
if [ "$?" -eq "0" ]; then echo wrote: "${LESS}"; fi' $* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="slideshow"> | |
<img src="http://farm6.static.flickr.com/5243/5373962623_0e23ed169b_t.jpg"> | |
<img src="http://farm6.static.flickr.com/5007/5374562138_30e01a767f_t.jpg" style="display:none"> | |
<img src="http://farm6.static.flickr.com/5288/5374562162_d48ca16567_t.jpg" style="display:none"> | |
<img src="http://farm6.static.flickr.com/5084/5374562208_3e1bbe58cc_t.jpg" style="display:none"> | |
<img src="http://farm6.static.flickr.com/5086/5374562182_5ec5c14403_t.jpg" style="display:none"> | |
</div> | |
<script type="text/javascript"> | |
var ims = document.getElementById('slideshow').children; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// includes bindings for fetching/fetched | |
PaginatedCollection = Backbone.Collection.extend({ | |
initialize: function() { | |
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
this.page = 1; | |
}, | |
fetch: function(options) { | |
options || (options = {}); | |
this.trigger("fetching"); |