If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"
npm adduser
# See unpushed commits | |
# git log --branches --not --remotes --simplify-by-decoration --decorate --oneline | |
# Comment in the above and uncomment this below for a color prompt | |
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "["${ref#refs/heads/}"]" | |
} | |
GREEN="\[\033[01;32m\]" |
def mostCommon(l: ParSeq[Int]): Int = { | |
def map(acc: Map[Int, Int], el: Int) = acc.updated(el, acc.getOrElse(el, 0) + 1) | |
def reduce(accA: Map[Int, Int], accB: Map[Int, Int]) = accA ++ accB.map { case (k, v) => k -> (v + accA.getOrElse(k, 0)) } | |
l.aggregate(Map[Int, Int]())(map, reduce).maxBy(_._2)._1 | |
} | |
List of 1000000 elements | |
Sequential time: 923 milliseconds |
-Xms128m | |
-Xmx750m | |
-XX:MaxPermSize=350m | |
-XX:ReservedCodeCacheSize=96m | |
-ea | |
-Dsun.io.useCanonCaches=false | |
-Djava.net.preferIPv4Stack=true | |
-Djsse.enableSNIExtension=false | |
-XX:+UseCodeCacheFlushing | |
-XX:+UseConcMarkSweepGC |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[0;33m\]$(__git_ps1 "[%s]")\[\e[0m\]\$ ' | |
\[\033[01;32m\]\u@\h\[\033[0;33m\]$(parse_git_branch)\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ |
import java.io.PrintStream | |
def log(m: String) | |
(implicit o: PrintStream, | |
prefix: String): Unit = o.println(s"[$prefix] $m") | |
implicit val out: PrintStream = System.out | |
def ?[T](implicit w: T): T = w |
# load zgen | |
source "${HOME}/.zgen/zgen.zsh" | |
# if the init scipt doesn't exist | |
if ! zgen saved; then | |
echo "Creating a zgen save" | |
# prezto and modules | |
zgen prezto |
<!-- put this to IDEA keymaps config folder. For v13 it is <userdir>\.IntelliJIdea13\config\keymaps\ --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<keymap version="1" name="Mac OS X 10.5+ Windows Ctrl" parent="Mac OS X 10.5+"> | |
<action id="$Copy"> | |
<keyboard-shortcut first-keystroke="meta C" /> | |
<keyboard-shortcut first-keystroke="meta INSERT" /> | |
<keyboard-shortcut first-keystroke="control C" /> | |
<keyboard-shortcut first-keystroke="control INSERT" /> | |
</action> | |
<action id="$Cut"> |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <arpa/inet.h> | |
#include <unistd.h> | |
#include <netinet/tcp.h> | |
int main(int argc, const char *argv[]) | |
{ |