I hereby claim:
- I am everdark on github.
- I am kyle9 (https://keybase.io/kyle9) on keybase.
- I have a public key ASA5zrGmEZcGHpilcsWqBhUFrDvbcIDnfXLtlPE5b-w3Two
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.
sudo apt remove openssh-server
sudo apt install openssh-server
/etc/ssh/sshd_config
file by running the command sudo vi /etc/ssh/sshd_config
and do the following
Port
to 2222 (or any other port above 1000)UsePrivilegeSeparation
to no#!/usr/bin/env Rscript | |
# kylechung 2017-03-25 | |
# refernece: http://mxnet.io/tutorials/r/charRnnModel.html | |
library(mxnet) | |
library(magrittr) | |
library(data.table) | |
# get the text data |
#!/usr/bin/env bash | |
usage() { | |
echo "" | |
echo "Usage: $0 command" | |
echo "" | |
echo "commands:" | |
echo " -b, --backup : backup the current data volume of MySQL container" | |
echo " -r, --restore : restore the data volume of MySQL container from a backup" | |
echo " -s, --sync : sync every local and remote file for whichever is newer" |
# reference: | |
# https://github.com/elastic/logstash/issues/1916 | |
# https://github.com/jruby/jruby/issues/1561#issuecomment-67953147 | |
cd /tmp | |
git clone https://github.com/jnr/jffi.git | |
cd jffi | |
ant jar # sudo apt-get install ant | |
# replace libjffi-1.2.so with the one build on pi |
object ParseArg { | |
val usage = "Usage: argparse --s1 v1 --s2 v2 --f opt" | |
def main(args: Array[String]) = { | |
if (args.length == 0) {System.err.println(usage); System.exit(1)} | |
def parseArg(argparsed: Map[Symbol,Any], arglist: List[String]): Option[Map[Symbol,Any]] = { | |
arglist match { |
#!/bin/bash | |
[ $# -eq 0 ] && { | |
echo "Usage: $0 [run|kill]" | |
exit 0 | |
} | |
[ "$1" == "run" ] && { | |
ssh -NfD 8888 <SERVERIP> | |
echo start ssh tunneling via my server over socks proxy |
#!/bin/bash | |
[ $# -eq 0 ] && { | |
echo give me some arguments! | |
exit 0 | |
} | |
echo $0 $1 ${2:-default_value} ${3:+and a third arg exists!} | |
echo total number of arguments passed: $# | |
echo all arguments: $* |
#!/bin/bash | |
range=10.0.1. | |
for digit in $(seq 1 254); | |
do | |
ping -c1 -W100 $range$digit >/dev/null 2>&1 | |
if [ "$?" -eq "0" ]; then | |
echo $range$digit | |
fi | |
done |
# save as ~/.screenrc | |
startup_message off | |
caption always "%{=u .r} %-w%<%{=ub .Y}%n %t%{=u .r}%+w " | |
hardstatus alwaysignore | |
hardstatus alwayslastline "%{= .K} [%l]%<%=%{= .Y}$USER%{= .R}@%H %=%{= .m} %Y/%m/%d%{= .M} %0c " | |
defutf8 on | |
#caption always "%{= wk} %{= KY} [%n]%t @ %H %{-} %= %{= KR} %l %{-} | %{= KG} %Y-%m-%d %{-} " | |
#hardstatus alwayslastline " %-Lw%{= Bw}%n%f %t%{-}%+Lw %=| %0c:%s " | |
defscrollback 20480 |