This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # restart service | |
| sudo su - | |
| /usr/syno/sbin/synoservice --list | |
| /usr/syno/sbin/synoservice --restart <service_name> | |
| # passwordless ssh | |
| #1. fix /etc/ssh/sshd_config | |
| AuthorizedKeyFile .ssh/authorized_keys | |
| #2. fix acl | |
| chmod 755 <home_directory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mvn archetype:generate -DgroupId=com.antarcticatec -DartifactId=antarcticatec-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false | |
| mvn archetype:generate \ | |
| -DgroupId=com.antarcticatec \ | |
| -DartifactId=antarcticatec-app \ | |
| -DarchetypeArtifactId=maven-archetype-quickstart \ | |
| -DinteractiveMode=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| #http://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html#sphx-glr-auto-examples-classification-plot-classifier-comparison-py | |
| git clone https://github.com/scikit-learn/scikit-learn | |
| cd scikit-learn | |
| # check anacona scikit version and upgrade necessary | |
| pip list | grep scikit | |
| conda install scikit-learn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # install with anacona | |
| # https://www.tensorflow.org/install/install_mac#installing_with_anaconda | |
| conda create -n tensorflow | |
| source activate tensorflow | |
| #Python 2.7 | |
| TF_PYTHON_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.3.0-py2-none-any.whl | |
| #Python 3.4, 3.5, or 3.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "<h1>body</h1>" | /bin/mailx \ | |
| -S smtp=smtp://aspmx.l.google.com \ | |
| -S from=no-reply@wonderland.com \ | |
| -s 'Subject [$(date -u %Y-%m-%d)] Hello World \nContent-Type: text/html\n' alice@wonderland.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://github.com/ehiggs/spark-terasort | |
| # https://samanaghazadeh.wordpress.com/2015/04/18/terasort-equivalent-for-apache-spark/ | |
| 10gb | |
| application_1492200106363_0096 TeraGen (10GB) 2017/04/14 20:33:33 2017/04/14 20:34:41 1.1 min hdfs 2017/04/14 20:34:41 | |
| application_1492200106363_0098 TeraSort 2017/04/14 20:46:55 2017/04/14 20:48:07 1.2 min hdfs 2017/04/14 20:48:07 | |
| application_1492200106363_0099 TeraValidate 2017/04/14 20:48:51 2017/04/14 20:49:20 29 s hdfs 2017/04/14 20:49:20 | |
| 100gb | |
| application_1492200106363_0097 TeraGen (100GB) 2017/04/14 20:35:37 2017/04/14 20:48:15 13 min hdfs 2017/04/14 20:48:15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh -i your_key_file -o UserKnownHostsFile=/dev/null \ | |
| -o CheckHostIP=no -o StrictHostKeyChecking=no user@ip_address | |
| https://cloud.google.com/solutions/connecting-securely#socks-proxy-over-ssh | |
| gcloud compute ssh example-instance \ | |
| --project my-project \ | |
| --zone us-central1-a \ | |
| --ssh-flag="-D" \ | |
| --ssh-flag="1080" \ | |
| --ssh-flag="-N" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://www.cloudera.com/documentation/director/latest/topics/director_security_socks.html | |
| Step 1: Set Up a SOCKS Proxy Server with SSH | |
| nohup ssh -i "your-key-file.pem" -CND 8157 ec2-user@instance_running_director_server & | |
| Step 2: Configure Your Browser to Use the Proxy | |
| Setting Up SwitchyOmega on the Google Chrome Browser | |
| proxy autoconfig: | |
| function regExpMatch(url, pattern) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://www.artificialworlds.net/blog/2015/12/07/java-https-to-a-server-with-a-self-signed-certificate/ | |
| cat << EOF > Get.java | |
| import java.net.URL; | |
| public class Get | |
| { | |
| public static void main( String[] args ) throws Exception | |
| { | |
| try | |
| { |