Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
#!/bin/sh | |
# Script to boot strap new EC2 instances and get them connected to our Puppet Enterprise master | |
rpm --quiet -q git rubygems || yum -y install git rubygems | |
if rpm --quiet -q pe-puppet; then | |
# Puppet Enterprise is already installed, let's reconfigure it - this instance was most likely booted up in the past, or is using an AMI that already has Puppet baked in | |
service pe-puppet stop | |
cat > /etc/puppetlabs/puppet/puppet.conf <<EOF |
export LANGUAGE="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
locale-gen en_US.UTF-8
dpkg-reconfigure locales
apt-get install unzip libpcre3 libpcre3-dev libssl-dev libpcrecpp0 zlib1g-dev debhelper dh-systemd libgeoip-dev autotools-dev libgd2-noxpm-dev libluajit-5.1-dev libmhash-dev libpam0g-dev libperl-dev po-debconf libexpat-dev libxslt1-dev
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
# import config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
ramfs: | |
rm -r tmp | |
mkdir tmp | |
sudo mount -t tmpfs -o size=512m tmpfs ./tmp | |
clean: | |
rm -r tmp/* | |
rm dist/build.js |
import Rx from 'rxjs'; | |
import { ActionsObservable } from 'redux-observable'; | |
import { ajax } from 'rxjs/observable/dom/ajax'; | |
import { loadGames } from '../../src/epics/games'; | |
import { ajax } from 'rxjs/observable/dom/ajax'; | |
jest.mock('rxjs/observable/dom/ajax', () => ({ | |
ajax: jest.fn(), | |
})); |