Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
/* false, 0, undefined, null, NaN, "" are false */ | |
> Boolean(false) | |
false | |
> Boolean(0) | |
false | |
> Boolean("") | |
false | |
> Boolean(undefined) | |
false |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
library(RCurl) | |
library(RJSONIO) | |
library(ggplot2) | |
# get data formats from: http://www.bls.gov/help/hlpforma.htm | |
# this one is "Average Hourly Earnings of All Employees: Private Service-Providing (CEU0800000003)" | |
bls.content <- getURLContent("http://api.bls.gov/publicAPI/v1/timeseries/data/CEU0800000003") | |
bls.json <- fromJSON(bls.content, simplify=TRUE) | |
bls.df <- data.frame(year=sapply(bls.json$Results[[1]]$series[[1]]$data,"[[","year"), |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
var expect = chai.expect; | |
describe('services', function(){ | |
var goat, monkey, monkey2, Donkey, tiger1, tiger2, lion; | |
beforeEach(function(){ | |
//load the module | |
module('app'); | |
//configure providers |
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.
// Superpowered logging for AngularJS. | |
angular.module('logFactory', ['ng']) | |
.value('logFactory_whiteList', /.*/) | |
//.value('logFactory_whiteList', /!|.*Ctrl|run/) | |
.value('logFactory_piercingMethods', {warn:true, error:true}) | |
.factory('logFactory', ['$log', 'logFactory_whiteList' , 'logFactory_piercingMethods', function ($log, whiteList, piercing) { | |
piercing = piercing || {} |
I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):
For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.
This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}