(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/* | |
`arc4random_uniform` is very useful but limited to `UInt32`. | |
This defines a generic version of `arc4random` for any type | |
expressible by an integer literal, and extends some numeric | |
types with a `random` method that mitigates for modulo bias | |
in the same manner as `arc4random`. | |
`lower` is inclusive and `upper` is exclusive, thus: | |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
I’ll assume you are on Linux or Mac OSX. For Windows, replace ~/.vim/
with $HOME\vimfiles\
and forward slashes with backward slashes.
Vim plugins can be single scripts or collections of specialized scripts that you are supposed to put in “standard” locations under your ~/.vim/
directory. Syntax scripts go into ~/.vim/syntax/
, plugin scripts go into ~/.vim/plugin
, documentation goes into ~/.vim/doc/
and so on. That design can lead to a messy config where it quickly becomes hard to manage your plugins.
This is not the place to explain the technicalities behind Pathogen but the basic concept is quite straightforward: each plugin lives in its own directory under ~/.vim/bundle/
, where each directory simulates the standard structure of your ~/.vim/
directory.
static NSString * BCP47LanguageCodeFromISO681LanguageCode(NSString *ISO681LanguageCode) { | |
if ([ISO681LanguageCode isEqualToString:@"ar"]) { | |
return @"ar-SA"; | |
} else if ([ISO681LanguageCode hasPrefix:@"cs"]) { | |
return @"cs-CZ"; | |
} else if ([ISO681LanguageCode hasPrefix:@"da"]) { | |
return @"da-DK"; | |
} else if ([ISO681LanguageCode hasPrefix:@"de"]) { | |
return @"de-DE"; | |
} else if ([ISO681LanguageCode hasPrefix:@"el"]) { |
#!/usr/bin/env bash | |
# Kill an Erlang process by node name | |
# | |
# e.g.: kill-erlang-node kred | |
# Check usage | |
if [ -z "$1" ]; then | |
echo "Usage: `basename $0` NODE_NAME" | |
exit 1 |
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 14, | |
// font family with optional fallbacks |