Skip to content

Instantly share code, notes, and snippets.

View hirejohnsalcedo's full-sized avatar
👋
Working from home

John hirejohnsalcedo

👋
Working from home
View GitHub Profile
@hirejohnsalcedo
hirejohnsalcedo / l
Created March 20, 2017 02:04
Alias for ls
alias l="clear && pwd && ls --color -lA | tr -s ' ' | cut -d' ' -f9 | sed '/^$/d'"
@hirejohnsalcedo
hirejohnsalcedo / gulp-hb
Created March 20, 2017 02:14
gulp-hb .json to .hbs to .html
function posts() {
return gulp.src('./src/data/*.json')
.pipe(through.obj(function (file, enc, cb) {
var name = path.parse(file.path).name;
var data = JSON.parse(String(file.contents));
gulp.src('./src/templates/*.hbs')
.pipe(hb().data(data))
.pipe(rename({
basename: name,
extname: '.html',
@hirejohnsalcedo
hirejohnsalcedo / gulp-rename
Created March 20, 2017 02:16
rename filename to foldername+index.html
.pipe(rename((path) => {
path.dirname += "/" + path.basename;
path.basename = "index";
})
@hirejohnsalcedo
hirejohnsalcedo / install-tmux
Created May 7, 2017 20:15 — forked from cdkamat/install-tmux
Install tmux 2.0 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
const clock = document.getElementById("clock");
function leadZeroFormat(i) {
if (i<10) {
i = "0" + i;
}
return i;
}
.buttonMenu {
padding: 15px;
background-color: inherit;
border: none; }
.buttonMenu .buttonMenuIcon {
display: flex;
justify-content: space-around;
flex-direction: column;
position: relative;
border: 2px solid #FFF;
set t_Co=256
syntax on
set background=dark
set nocompatible
set number
filetype off
set tabstop=2 shiftwidth=2 expandtab
call plug#begin('~/.vim/plugged')
Plug 'VundleVim/Vundle.vim'
" Javascript Syntax
{
root: true,
parser: 'babel-eslint',
plugins: [/*'import', */'jsx-a11y', 'react'],
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true

Around 2006-2007, it was a bit of a fashion to hook lava lamps up to the build server. Normally, the green lava lamp would be on, but if the build failed, it would turn off and the red lava lamp would turn on.

By coincidence, I've actually met, about that time, (probably) the first person to hook up a lava lamp to a build server. It was Alberto Savoia, who'd founded a testing tools company (that did some very interesting things around generative testing that have basically never been noticed). Alberto had noticed that people did not react with any urgency when the build broke. They'd check in broken code and go off to something else, only reacting to the breakage they'd caused when some other programmer pulled the change and had problems.

# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# under public domain terms
country_bounding_boxes = {
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)),
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)),
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)),
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),