set -g prefix C-a | |
set -g status-bg black | |
set -g status-fg default | |
set -g status-left-length 20 | |
set -g status-left '#[fg=green]#H#[fg=default]' | |
set -g status-justify centre | |
set -gw window-status-format '#I#F#$ #W' | |
set -gw window-status-current-format '#[fg=red](#[fg=default]#I#F#[fg=yellow]⚡#[fg=default] #[fg=white]#W#[fg=default]#[fg=red])#[fg=default]' | |
set -g status-keys vi |
## keybindings | |
unbind C-b | |
unbind C-a | |
unbind % | |
unbind , | |
unbind . | |
unbind n | |
unbind p | |
unbind [ | |
unbind '"' |
I want to make a video to show my class of would-be IT people. If you write code, would you send me a video clip (webcam, less than 30s) with the following?
- Introduce yourself (name, where you work)
- Why you love what you do
- Why you love open-source software (optional, but would be super helpful)
Email the clip (or a link I can download the clip) to bphogan at gmail
and be sure to include your Twitter username so I can add that on your clip.
In order to configure the bitbucket hook we need two things: The user's API Token and the project token. In order to retrieve the first one whe should click on our username (on the top right corner of the page), click on configure and then click on "Show API Token". This API token will be used as password for our user.
For the project's token we need to go to the job configuration (/job/{job-name}/configure), "build triggers" and enable "trigger remote builds" and, there, input some random text as token.
Once we have these two tokens we can go to bitbucket, repo administration, hooks section, and add a new jenkins hook that we will configure like:
- Endpoint: http://{username}:{APIToken}@{hostname}/{prefix_if_you_have_one}
- Module name: Whatever (I usually leave this one blank)
- Project name: The job name
- Token: The project token
function map (arr, func) { | |
return Promise.resolve().then(function () { | |
return arr.map(function (el) { return func(el) }) | |
}).all() | |
} | |
function mapSeries (arr, func) { | |
let currentPromise = Promise.resolve() | |
let promises = arr.map(function (el) { | |
return currentPromise = currentPromise.then(function () { |
############################################################################ | |
# _ | |
# | |_ _ __ ___ _ ___ __ | |
# | __| '_ ` _ \| | | \ \/ / | |
# | |_| | | | | | |_| |> < | |
# \__|_| |_| |_|\__,_/_/\_\ | |
# | |
# Cheatsheets: | |
# https://devhints.io/tmux | |
# `property not found` issue: |
#!/bin/bash | |
# Go build script that runs cloc, cpd, lint, vet, test and coverage for Jenkins | |
# | |
# Outside tools include: | |
# gocov: go get github.com/axw/gocov | |
# gocov-xml: go get github.com/t-yuki/gocov-xml | |
# go2xunit: go get bitbucket.org/tebeka/go2xunit | |
# jscpd: npm i jscpd -g | |
# cloc: npm i cloc -g |
var mongoose = require('./index') | |
, TempSchema = new mongoose.Schema({ | |
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']} | |
}); | |
var Temp = mongoose.model('Temp', TempSchema); | |
console.log(Temp.schema.path('salutation').enumValues); | |
var temp = new Temp(); | |
console.log(temp.schema.path('salutation').enumValues); |