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($) { | |
$.fn.extend({ | |
newWindow: function() { | |
return this.each(function() { | |
$(this).attr("target", "_blank"); | |
}); | |
} | |
}); | |
}) (jQuery); |
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($) { | |
$.fn.extend({ | |
popup: function(options) { | |
// accept an options object with sensible defaults | |
var defaults = { | |
scrollbars: false, | |
resizable: false, | |
status: false, | |
width: 800, | |
height: 600 |
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($) { | |
$.fn.extend({ | |
addHover: function() { | |
return this.each(function() { | |
var $self = $(this); | |
$self.hover( | |
function() { | |
$(this).addClass("hover"); | |
}, | |
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
function ie6FlickerFix() { | |
try { | |
document.execCommand("BackgroundImageCache", false, true); | |
} catch(err) {} | |
} | |
var addLoadEvent = function(func) { | |
var oldonload = window.onload; | |
if (typeof window.onload != 'function') { | |
window.onload = func; |
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
public static string PageCssClass(this HtmlHelper helper, string seperator="-") | |
{ | |
string names = String.Format("{0} {1} {0}{2}{1}", | |
helper.ViewContext.RouteData.Values["Controller"], | |
helper.ViewContext.RouteData.Values["Action"], | |
seperator); | |
return names.ToLower(); | |
} |
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
void roundedRect(float x, float y, float w, float h, float rx, float ry) { | |
beginShape(); | |
vertex(x,y+ry); //top of left side | |
bezierVertex(x,y,x,y,x+rx,y); //top left corner | |
vertex(x+w-rx,y); //right of top side | |
bezierVertex(x+w,y,x+w,y,x+w,y+ry); //top right corner | |
vertex(x+w,y+h-ry); //bottom of right side | |
bezierVertex(x+w,y+h,x+w,y+h,x+w-rx,y+h); //bottom right corner |
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
$.fn.track = function(event) { | |
event = typeof event !== 'undefined' ? event : 'click'; | |
if(!window.console){ window.console = {log: function(){} }; } | |
$(this).on(event, function(e) { | |
var category = $(this).data('category'); | |
var action = $(this).data('action'); | |
var label = $(this).data('label'); | |
try { | |
if (category && action && label) { | |
console.log('ga track event: ', category, action, label); |
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
Show hidden characters
{ | |
"cmd": ["xcodebuild"], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${project_path:${folder}}", | |
"selector": "source.c, source.c++", | |
"variants": | |
[ | |
{ | |
"name": "Run", | |
"cmd": ["bash","-c", "'${project_path}/bin/${project_base_name}.app/Contents/MacOS/${project_base_name}'" ] |
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
{ | |
"options": | |
[ | |
"-Isystem", | |
"-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/", | |
"-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/", | |
"-Wno-deprecated-declarations", | |
"-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks", | |
"-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/", | |
"-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.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
{ | |
"cmd": ["make"], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${project_path:${folder}}", | |
"selector": "source.c, source.c++", | |
"variants": | |
[ | |
{ | |
"name": "Run", | |
"working_dir": "${project_path:${folder}}", |
OlderNewer