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
| git tag bad HASH | |
| git co bad | |
| git commit --ammend | |
| git rebase --onto HEAD bad master | |
| git tag -d bad |
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 tmp = 1; | |
| function foo(x) { | |
| var tmp = 2; | |
| return function (y) { | |
| alert(x + y + (++tmp)); | |
| } | |
| } | |
| var bar = foo(3); | |
| bar(tmp); | |
| bar(tmp); |
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> | |
| <meta charset=utf-8 /> | |
| <title>Media querys IE fallback</title> | |
| <style> | |
| p { | |
| color: blue; | |
| } |
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> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
| <title>Events Flow</title> | |
| <style type="text/css" media="screen"> | |
| div { | |
| background-color: #ddd; | |
| padding: 40px; | |
| border: 1px solid white; | |
| } |
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 AClass = new Class({ | |
| Implements: [ExtendedLogger], | |
| initialize: function() { | |
| this.initLogger('AClass', { | |
| skip: ['silentMethod'], | |
| debug: true | |
| }); | |
| this.silentMethod(); | |
| this.otherMethod(); | |
| }, |
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::hasProperties = (properties) -> | |
| self = @ | |
| self.prototype.properties = {} | |
| definePropertie = (key, value) -> | |
| self.prototype.properties[key] = value | |
| self.prototype[key] = (newValue) -> | |
| @properties[key] = newValue | |
| @ | |
| for key, value of properties | |
| definePropertie key, 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
| <a id='clickMe' href='#'>Click me</a> |
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
| String::pad = (l, s) -> | |
| if (l -= @length) > 0 | |
| (s = new Array(Math.ceil(l / s.length) + 1).join(s)).substr(0, s.length) + this + s.substr(0, l - s.length) | |
| else | |
| @ | |
| app = angular.module "yoplayApp", ["ngResource"] | |
| app.factory "myHttpInterceptor", ["$q", "$window", "$rootScope", ($q, $window, $rootScope) -> | |
| (promise) -> |
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
| import javax.script.ScriptEngine; | |
| import javax.script.ScriptEngineManager; | |
| import javax.script.ScriptException; | |
| import org.apache.commons.lang.StringEscapeUtils; | |
| import org.codehaus.jackson.map.ObjectMapper; | |
| import java.io.ByteArrayOutputStream; |
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 step = 0; | |
| async.waterfall([ | |
| function (next){ | |
| step = 1; | |
| getJson('/country', function(data) { next(null, data); }); | |
| }, | |
| function (country, next){ | |
| step = 2; | |
| getJson('/weather', function(data) { next(null, country, data); }); |