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
package control | |
{ | |
public class AlertsController | |
{ | |
[Inject( "alertsDelegate" )] | |
public var delegate:CacheEnabledDelegate; | |
[Inject] | |
public var serviceHelper:IServiceHelper; | |
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
<Graphic version="2.0" xmlns="http://ns.adobe.com/fxg/2008" | |
scaleGridLeft="0" scaleGridTop="0" scaleGridRight="0" scaleGridBottom="0"> | |
<Rect x="0" y="0" width="1" height="1"> | |
<fill> | |
<SolidColor color="#FFFFFF" alpha="0" /> | |
</fill> | |
</Rect> | |
</Graphic> |
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
#!/usr/bin/env node | |
// todo: try to require jshint here, instead of spawning process, then fallback to spawning process. | |
var jshint = nrequire('jshint'); | |
if (jshint) return process.exit(0); | |
// jshint not installed locally, spawn process instead. | |
// basically the same, but less pretty. | |
var exec = require('child_process').exec; |
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
// mock ajax | |
$.ajaxPrefilter( function( options, originalOptions, jqXHR ) { | |
if ( /^\/?mock-ajax/.test( originalOptions.url ) ) { | |
// make new deferred and save any success/error handlers | |
var success = options.success, | |
error = options.error; | |
// kill off the old handlers | |
options.success = options.error = null; |
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
// shmemplates. req: needs to work x-domain and be fully cacheable | |
Bocoup.utils.template = (function($) { | |
// Request a template from the server. Returns a Deferred object. | |
function fn(key) { | |
return $.Deferred(function(dfd) { | |
if (key in fn.cache) { | |
dfd.resolve(fn.cache[key]); | |
} else { | |
$.getScript(fn.url + key, 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
// GOOGLE3 usage - bigger projects | |
var MyController = function($scope, $location) { | |
// controller's private state | |
this.$location = $location; | |
this.some = 12; | |
this.$scope = $scope; | |
// methods accessible from template | |
// these methods (defined in constructor) should contain only few logic, |
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
/** | |
* @license AngularJS | |
* (c) 2010-2012 AngularJS http://angularjs.org | |
* License: MIT | |
*/ | |
/** | |
* Backward compatibility module for AngularJS | |
* @author Vojta Jina <[email protected]> | |
* |
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
<html> | |
<head></head> | |
<body> | |
<input name="myButton" type="button" value="button 1"> | |
<input name="myButton" type="button" value="button 2"> | |
<input name="myButton" type="button" value="button 3"> | |
<script type="text/javascript"> | |
var buttons = document.getElementsByName("myButton"); | |
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
//from most to least verbose, but it is all the same in the end. | |
(function() { | |
var module = angular.module("myApp.myModel", []); | |
var MyModel = function MyModel() { | |
this.asyncService = null; | |
this.someApi = 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
#!/bin/sh | |
# | |
# Pre-commit hooks | |
###################################################################### | |
# Environment Setup | |
# 1) Change directory to build dir so we can run grunt tasks. | |
# 2) Make sure path is extended to include grunt task executable | |
# dir, as this commit shell is executed in the git | |
# client's own shell; ie Tower and WebStorm have own shell path. |
OlderNewer