Skip to content

Instantly share code, notes, and snippets.

@leipert
leipert / rules.rb
Last active January 29, 2017 03:16
Full brew and brew cask upgrade cycle in https://github.com/benjaminoakes/maid
#
# Full brew and brew cask upgrade cycle in https://github.com/benjaminoakes/maid
#
Maid.rules do
### Homebrew:
rule 'Updating brew formulas' do
log(`brew update`)
end

Keybase proof

I hereby claim:

  • I am leipert on github.
  • I am leipert (https://keybase.io/leipert) on keybase.
  • I have a public key whose fingerprint is B52F 69BF F963 50FD 93E9 1B64 148B EA37 CB35 B2AC

To claim this, I am signing this object:

@leipert
leipert / detectBrowserLanguage.js
Last active March 11, 2024 02:10 — forked from anonymous/detectBrowserLanguage.js
Detect browser language in javascript (utilizing lodash)
// These window.navigator contain language information
// 1. languages -> Array of preferred languages (eg ["en-US", "zh-CN", "ja-JP"]) Firefox^32, Chrome^32
// 2. language -> Preferred language as String (eg "en-US") Firefox^5, IE^11, Safari,
// Chrome sends Browser UI language
// 3. browserLanguage -> UI Language of IE
// 4. userLanguage -> Language of Windows Regional Options
// 5. systemLanguage -> UI Language of Windows
var browserLanguagePropertyKeys = ['languages', 'language', 'browserLanguage', 'userLanguage', 'systemLanguage'];
@leipert
leipert / .gitconfig
Last active September 20, 2016 11:55
Useful git aliases
[alias]
## pulling
# git p: pulls all branches, autostashing and rebasing instead of merging
# this is a similiar behaviour to git-up
p = pull --rebase --autostash --all --verbose --no-recurse-submodules
# git smiu: update all submodules recursively (and init them if necessary)
smiu = submodule update --init --recursive
# git up: update current project
up = "!git p && git smiu"