(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.
$ curl --help | |
Usage: curl [options...] <url> | |
--abstract-unix-socket <path> Connect via abstract Unix domain socket | |
--alt-svc <file name> Enable alt-svc with this cache file | |
--anyauth Pick any authentication method | |
-a, --append Append to target file when uploading | |
--basic Use HTTP Basic Authentication | |
--cacert <file> CA certificate to verify peer against | |
--capath <dir> CA directory to verify peer against | |
-E, --cert <certificate[:password]> Client certificate file and password |
using System; | |
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using System.Dynamic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.Primitives; | |
using SharpRaven.Data; |
FROM ruby:2.3-onbuild | |
VOLUME /opt/postal/config | |
ENV LOG_TO_STDOUT 1 | |
ENV AM_CONFIG_ROOT /opt/postal/config | |
RUN gem install procodile | |
RUN apt-get update -qq && apt-get install -yqq nodejs |
import React from 'react'; | |
const toPromise = (load) => (new Promise((resolve) => ( | |
load(resolve) | |
))); | |
class LazilyLoad extends React.Component { | |
constructor() { | |
super(...arguments); |
#!/usr/bin/env bash | |
# Usage: restart-last-build <project-id> | |
# You must set the environment variable API_KEY to your codeship API key, for example: | |
# $ CODESHIP_API_KEY=abc123 restart-last-build 1234 | |
PROJECT_ID=$1 | |
set -e | |
echo Restarting last build for project $PROJECT_ID |
(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.
// Brightness math based on: | |
// http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx | |
$red-magic-number: 241; | |
$green-magic-number: 691; | |
$blue-magic-number: 68; | |
$brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number; | |
@function brightness($color) { | |
// Extract color components |
Ensuring that your web pages are delivered to the user as quickly as possible, results in a great user experience. However, users spend more time interacting with the page than waiting for it to download. This makes the smoothness and responsiveness of the site even more critical. Janky page scrolls, disjointed animations or delayed visual cues in a page are just as bad as a site that takes time to load.
Most modern web browsers have tools that can help determine the various performance bottlenecks during typical user interactions. Excellent tutorials have also been written about performance workflows. Despite this, rapid development and deploy cycles make it hard to implement regular performance audits. Tools like [PageSpeed Insights](http://updates.html5rocks.com/201
class YourNamespace.Errors | |
window.onerror = (e) => @report(e) | |
@report: (e) -> | |
img = new Image(1,1) | |
img.src = '//' + your_config.errors_host + '/images/error_pixel.gif' | |
img.style.display='none' | |
document.getElementsByTagName('body')[0].appendChild(img); |
<?php | |
/* From https://www.usps.com/send/official-abbreviations.htm */ | |
$us_state_abbrevs_names = array( | |
'AL'=>'ALABAMA', | |
'AK'=>'ALASKA', | |
'AS'=>'AMERICAN SAMOA', | |
'AZ'=>'ARIZONA', | |
'AR'=>'ARKANSAS', |