This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
$("#submit-btn").on('click', function(event) { | |
event.preventDefault(); | |
var form, url, data, requests; | |
form = $("#form"); | |
url = form.attr('action'); | |
data = form.serializeArray(); | |
requests = { | |
getJsonAction : 'http://url.com' // No query param here. jsonp mode sets it. |
This file contains 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 | |
// Stuff to figure out: | |
// - where should this file live and in what folder structure of /vendor | |
// - what namespace should this class have | |
// - how do you autoload this class? | |
// - how do you use this class within a controller | |
namespace Custom\Bundle\HelloWorldBundle; |
This file contains 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 | |
// Stuff to figure out: | |
// - where should this file live and in what folder structure of /vendor | |
// - what namespace should this class have | |
// - how do you autoload this class? | |
// - how do you use this class within a controller | |
namespace Quickbase\Quickbase\{foldername}; |
This file contains 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
{ | |
"name": "symfony/framework-standard-edition", | |
"description": "The \"Symfony Standard Edition\" distribution", | |
"autoload": { | |
"psr-0": { | |
"": "src/", | |
"ACH": "vender/quickbase/quickbase" | |
} | |
}, | |
"require": { |
This file contains 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
/* | |
* Grid Overlay for Twitter Bootstrap | |
* Assumes a 1.692em baseline grid (22px/13px) | |
*/ | |
@media (min-width: 1200px) { | |
body { | |
background: -webkit-linear-gradient( | |
90deg, | |
rgba(0,0,0,0.05), | |
rgba(0,0,0,0.05) 4.545%, |
This file contains 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 newYear = new Date(new Date().getFullYear() + 1, 1 - 1, 1); | |
$(document).ready(function(){ | |
$('#defaultCountdown').countdown({until: newYear}); | |
$('#removeCountdown').toggle(function() { | |
$(this).text('Re-attach'); | |
$('#defaultCountdown').countdown('destroy'); | |
}, function() { | |
$(this).text('Remove'); |
This file contains 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
String.prototype.ellipsis = function(numOfWords, _text, wordCount ) { | |
_text = this; | |
wordCount = _text.trim().replace(/\s+/g, " ").split(' ').length; | |
_text = _text.trim().split(' '); | |
_text.splice(numOfWords, wordCount, "..."); | |
return _text.join(' '); | |
} |
This file contains 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
// {String} f File name | |
// {Boolean} c Condition | |
// {undefined} [l,j,s] Shortcut for var. | |
var loadjs = function(f,c,l,j,s,a) { | |
a = ((typeof f == 'object')? f : []); | |
f = ((typeof f == 'undefined') ? '' : | |
((typeof f == 'object') ? | |
((typeof f[0] !== 'undefined')? f[0] : '') | |
: f)); | |
l = f.length; |
This file contains 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
jQuery.fn.innerWrap = function() { | |
var a, args = arguments; | |
return this.each(function() { | |
if (!a) | |
a = jQuery.clean(args, this.ownerDocument); | |
// Clone the structure that we're using to wrap | |
var b = a[0].cloneNode(true), | |
c = b; | |
// Find the deepest point in the wrap structure | |
while ( b.firstChild ) |
NewerOlder