This is a d3 map using topojson files derived from shapefiles from the datameet/maps repo.
Many thanks to authors of these awesome code samples.
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
# install wine 1.7 | |
add-apt-repository ppa:ubuntu-wine/ppa | |
sudo apt-get update | |
sudo apt-get install wine1.7 | |
# download steam | |
curl -o ~/Downloads/SteamSetup.exe http://media.steampowered.com/client/installer/SteamSetup.exe | |
# install some tricks | |
winetricks vcrun2010 |
This is a d3 map using topojson files derived from shapefiles from the datameet/maps repo.
Many thanks to authors of these awesome code samples.
(function(){function b(a,b){return function(c){return c&&c.type in a?a[c.type](c):b}}function c(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+ -2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function d(a,b){a.type in e&&e[a.type](a,b)}function f(a,b){d(a.geometry,b)}function g(a,b){for(var c=a.features,e=0,f=c.length;e<f;e++)d(c[e].geometry,b)}function h(a,b){for(var c=a.geometries,e=0,f=c.length;e<f;e++)d(c[e],b)}function i(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)b.apply(null,c[d])}function j(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)for(var f=c[d],g=0,h=f.length;g<h;g++)b.apply(null,f[g])}function k(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)for(var f=c[d][0],g=0,h=f.length;g<h;g++)b.apply(null,f[g])}function l(a,b){b.apply(null,a.coordinates)}function m(a,b){for(var c=a.coordinates[0],d=0,e=c.length;d<e;d++)b.apply(null,c[d])}function n(a){return a.source}function o(a){return a.target}function p(b,c){function r(b){var c=Math.sin(p-(b*=p))/q,d=Math.sin(b)/q,g=c*h*e+d*n*k,j=c*h*f+d*n*l,m=c*i+d |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2
# miner_pool.sh - executes a script against each instance: ./mine_pool.sh setup.sh | |
# list your instances here | |
# use ami-12b6477b | |
INSTANCES="ec2-50-19-52-212.compute-1.amazonaws.com | |
ec2-50-16-126-107.compute-1.amazonaws.com | |
ec2-184-72-177-183.compute-1.amazonaws.com | |
ec2-50-17-126-57.compute-1.amazonaws.com | |
ec2-184-73-119-153.compute-1.amazonaws.com" |
// add the filter to your application module | |
angular.module('yourAppName', ['filters']); | |
/** | |
* Truncate Filter | |
* @Param string | |
* @Param int, default = 10 | |
* @Param string, default = "..." | |
* @return string | |
*/ |
var SailsOrm = require([path to sails]'/lib/hooks/orm'); | |
var _ = require( 'lodash' ); | |
var async = require('async'); | |
function orm () | |
{ | |
/** | |
* Start the ORM layer | |
* |
/** | |
* api/models/User.js | |
* | |
* The user model contains the instance method for validating the password. | |
*/ | |
var bcrypt = require('bcrypt'); | |
function hashPassword(values, next) { | |
bcrypt.hash(values.password, 10, function(err, hash) { |
################# | |
# Update packages | |
################# | |
DEBIAN_FRONTEND="noninteractive" sudo apt-get --assume-yes update | |
DEBIAN_FRONTEND="noninteractive" sudo apt-get --assume-yes upgrade | |
######################## | |
# Install the Oracle JDK | |
######################## |