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 | |
COMPRESS=true | |
YUI_COMPRESSOR_PATH="../../tools/YUI_Compressor/build/yuicompressor-2.4.6.jar" | |
### JS FILES ### | |
# CONFIG | |
MAIN_FILE_NAME="app" | |
MAIN_FILE_PATH="../assets/$MAIN_FILE_NAME.js" |
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
<? | |
function compress($buffer) { | |
/* remove comments */ | |
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer); | |
/* remove tabs, spaces, newlines, etc. */ | |
$buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer); | |
return $buffer; | |
} | |
function getTemplate($filename) { |
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
config = _.map [ | |
[1, "Important", "Urgent"] | |
[2, "Important", "Not Urgent"] | |
[3, "Not Important", "Not Urgent"] | |
[4, "Not Important", "Not Urgent"] | |
], (x) -> {id:x[0], vtitle:x[1], htitle:x[2]} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test</title> | |
<script src="js/jquery.js" type="text/javascript"></script> | |
<script src="js/underscore.js" type="text/javascript"></script> | |
<script src="js/backbone.js" type="text/javascript"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(function(){ | |
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
# gems | |
gem 'resque' | |
# the data | |
gem 'devise' | |
gem 'carrierwave' | |
gem 'fog' | |
gem 'rmagick' | |
# controllers and views |
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
var csrf_token = $("meta[name='csrf-token']").attr("content"); | |
$("body").bind("ajaxSend", function(elm, xhr, s){ | |
if (s.type == "POST" || s.type == "PUT" || s.type == "DELETE") { | |
xhr.setRequestHeader('X-CSRF-Token', csrf_token); | |
} | |
}); |
NewerOlder