See Also:
Level | Score | Regex | Credit |
---|
;; Prevent the cursor from blinking | |
(blink-cursor-mode 0) | |
;; Don't use messages that you don't read | |
(setq initial-scratch-message "") | |
(setq inhibit-startup-message t) | |
;; Don't let Emacs hurt your ears | |
(setq visible-bell t) | |
;; You need to set `inhibit-startup-echo-area-message' from the | |
;; customization interface: |
See Also:
Level | Score | Regex | Credit |
---|
angular.module('myApp', ['ngRoute']) | |
.provider('Weather', function() { | |
var apiKey = ""; | |
this.getUrl = function(type, ext) { | |
return "http://api.wunderground.com/api/" + | |
this.apiKey + "/" + type + "/q/" + | |
ext + '.json'; | |
}; |
/* thumb截中间区域 */ | |
fieldset { | |
display: inline-block; | |
border: 1px solid #ddd; | |
} | |
.thumb { | |
position: relative; |
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
ASQ() | |
.all( // or .gate(..) | |
// these 3 run "in parallel" | |
function(done){ setTimeout(done,100); }, | |
function(done){ setTimeout(done,200); }, | |
function(done){ setTimeout(done,300); } | |
) | |
.then(function(){ | |
alert("All tasks are complete, and that only took ~300ms, not 600ms!"); | |
}); |
// based off of https://gist.github.com/creationix/5544019 | |
// these could probably be condensed more, but I'm just doing this | |
// quickly | |
exports = module.exports = run; | |
exports.call = call; | |
exports.invoke = invoke; | |
exports.bind = bind; |
import XMonad | |
import XMonad hiding (Tall) | |
import XMonad.Actions.CycleWS | |
import XMonad.Actions.FloatKeys | |
import XMonad.Actions.GridSelect | |
import XMonad.Hooks.DynamicHooks | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks |
Authored by Peter Rybin , Chrome DevTools team
In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.
Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example:
/** | |
* How to have floating scrollbars in Firefox (Linux, Windows & Mac). | |
* Screenshot: http://i.imgur.com/bn44L.png | |
* You need Firefox > 18. Just run this code in a browser-scratchpad: | |
* | |
* Ping me on Twitter (@paulrouget) if you run into problems. | |
* | |
* 1. Go to about:config - Set devtools.chrome.enabled to true | |
* 2. Starts Scratchpad (Shift-F4) | |
* 3. In Scratchpad's menubar, check "Environment > Browser" |