npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
// or npm login
This file contains 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 randomGreenishColor(i, total) { | |
var g = randomFromTo(128, 255); | |
var r = randomFromTo(0, g-50); | |
var b = randomFromTo(0, g-50); | |
return rgbToHex(r,g,b); | |
} | |
function rgbToHex(r, g, b) { | |
return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b); | |
} |
This file contains 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
# User-specific files | |
*.user | |
*.aps | |
*.pch | |
*.vspscc | |
*_i.c | |
*_p.c | |
*.ncb | |
*.suo | |
*.tlb |
This file contains 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 readable_number(num){ | |
var bits_a = ["thousand", "million", "billion", "trillion", "zillion"]; | |
var bits_b = ["ten", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy", "eighty", "ninety"]; | |
var bits_c = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"]; | |
if (num==0){return 'zero';} | |
var result = (num<0)?'minus ':''; | |
num = Math.abs(num); |
This file contains 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/perl | |
use 5.008; | |
use strict; | |
use Memoize; | |
# usage: | |
# git-large-files 500k | |
# git-large-files 0.5m | |
# git-large-files 5b |
This file contains 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
require 'fileutils' | |
namespace :db do | |
desc 'pull the production PostgreSQL database into the development SQLite' | |
task :pull do | |
Rake::Task['db:download_pg_dump'].invoke | |
Rake::Task['db:optimze_pg_dump_for_sqlite'].invoke | |
Rake::Task['db:recreate_with_dump'].invoke | |
end |
This file contains 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
SELECT | |
SUM(pgClass.reltuples) AS totalRowCount | |
FROM | |
pg_class pgClass | |
LEFT JOIN | |
pg_namespace pgNamespace ON (pgNamespace.oid = pgClass.relnamespace) | |
WHERE | |
pgNamespace.nspname NOT IN ('pg_catalog', 'information_schema') AND | |
pgClass.relkind='r' |
- Goto chrome://flags and enable Enable Developer Tools experiments
- Open de Developer toolbar and goto the General tab within settings. Check the Enable source maps
- Restart chrome
- Open de Developer toolbar and goto the Expirements tab. Check "Support for Sass"
Add the following to your config/environments/development.rb
config.assets.debug = true
config.sass.debug_info = true
This file contains 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
; | |
; Music player tweak | |
; | |
PrintScreen:: | |
Send {Media_Prev} | |
Return | |
Break:: | |
Send {Media_Next} | |
Return |
OlderNewer