Chromium OS is cool. Chromium OS with crouton is cooler. Chromium OS with Docker is even cooler. This is specifically a guide for the Chromebook Pixel 2 (2015), but I can't think of any reason it wouldn't work with other devices.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
You can trigger a GitHub Pages (Jekyll) rebuild with a single API call. This is pretty useful for auto-publishing blog posts from a bot like Zapier in conjunction with future: false
in your Jekyll config.yml
. Just future-date your posts, and they'll go live when that date rolls around. I use a version of this setup for my blog at greghaskins.com.
-
Create a GitHub personal access token and save it somewhere. It needs to have the
repo
access scope (at least). -
Create a file at the root of your repo (e.g.
.publish
) with some dummy content.$ echo ".publish" > .publish
#Put this in Export-Chocolatey.ps1 file and run it: | |
#.\Export-Chocolatey.ps1 > packages.config | |
#You can install the packages using | |
#choco install packages.config -y | |
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>" | |
Write-Output "<packages>" | |
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" } | |
Write-Output "</packages>" |
import java.io.FileDescriptor; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
public class HelloWorld{ | |
private static HelloWorld instance; | |
public static void main(String[] args){ | |
instantiateHelloWorldMainClassAndRun(); |
require('font-awesome/css/font-awesome.css'); | |
document.body.innerHTML = '<i class="fa fa-fw fa-question"></i>'; |
This font is manually patched with Fontforge. It includes the glyphs from DejaVu Sans Mono for Powerline.
I recommend DirectWrite-patched VIM builds. I'm using KaoriYa's build (http://www.kaoriya.net/software/vim/)
Add the following lines to your .vimrc/_vimrc:
# $ curl -L http://git.io/opsru_setapp > set-app.sh | |
# $ . set-app.sh app_name | |
# | |
# cd into app directory and sets the environment variables | |
# on AWS OpsWorks Instances running Unicorn Rails App Server. | |
APP_NAME=$1 && \ | |
cd "/srv/www/${APP_NAME}/current" && \ | |
export RAILS_ENV=production && \ | |
cat "/srv/www/${APP_NAME}/shared/config/unicorn.conf" | grep ENV > "/tmp/${APP_NAME}_env" && \ |
#!/bin/sh | |
# | |
# The script used to deploy Rails apps to AWS OpsWorks via Codeship. | |
# | |
# It requires the following environment variables to be set: | |
# | |
# - AWS_ACCESS_KEY_ID | |
# - AWS_SECRET_ACCESS_KEY | |
# - APP_NAME | |
# - S3_BUCKET |