It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
// get HEX/RGB/CMYK by Pantone code (parse official Pantone website search result) | |
async function pantone(pantoneCode){ | |
pantoneCode = pantoneCode // validate input: | |
.trim() | |
.replace(/^PANTONE /i, '') // we don't need 'PANTONE ' here | |
.replace(/ /g, '-'); // no spaces | |
return fetch(`https://www.pantone.com/color-finder/${pantoneCode}`) | |
.then(response => response.text()) | |
.then(doc => new DOMParser().parseFromString(doc, 'text/html')) |
This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.
The Atom documentation is excellent. It's highly worth reading the flight manual.
var https = require('https'); | |
var util = require('util'); | |
exports.handler = function(event, context) { | |
console.log(JSON.stringify(event, null, 2)); | |
console.log('From SNS:', event.Records[0].Sns.Message); | |
var postData = { | |
"channel": "#aws-sns", | |
"username": "AWS SNS via Lamda :: DevQa Cloud", |
{ config, pkgs, ... }: | |
let | |
hostname = "luz3"; | |
in { | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
# I use VirtualBox to connect to Windows and Linux guests |
Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
// original found : https://bitcointalk.org/index.php?topic=38246.0 | |
CREATE TABLE blocks ( | |
hash char(32) binary primary key, | |
version integer, | |
hashPrev char(32) binary not null, | |
hashMerkleRoot char(32) binary not null, | |
nTime integer unsigned not null, | |
nBits integer unsigned not null, |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This gist illustrates how you would add Google Analytics tracking into your Rails mailers. Add the tracking_interceptor.rb
into your path and enable it for your mailers with:
register_interceptor TrackingInterceptor
The easiest way to load the Mysql Time Zone tables from your Mac OS time zone fields is via this command:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
However, on many systems like mine that will fail because some of the time zone information is incompatible with the database schema for the time zone tables.
Therefore, you'll want to load the time zone information into a text file and edit it to only include the time zones you need. (Or, attempt to find the data breaking the import.)
mysql_tzinfo_to_sql /usr/share/zoneinfo > zone_import.sql