Resources:
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
/* | |
To run, save as demo.js in an empty folder and then run: | |
yarn add babel-cli babel-plugin-transform-class-properties | |
./node_modules/.bin/babel-node --plugins transform-class-properties demo.js | |
*/ |
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
" Try out different colours | |
let x=0 | |
nnoremap <Left> :let x-=1 \| exe 'highlight CursorLine cterm=NONE ctermbg='.x \| echo x<cr> | |
nnoremap <Right> :let x+=1 \| exe 'highlight CursorLine cterm=NONE ctermbg='.x \| echo x<cr> |
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
from urllib.request import urlopen | |
from urllib.parse import urljoin, unquote_plus | |
import re | |
from random import choice | |
from bs4 import BeautifulSoup | |
BASE_URL = 'https://en.wikipedia.org/' |
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
import sys | |
from select import select | |
import tty | |
import termios | |
import atexit | |
def disable_line_buffering(): | |
original_tty_attrs = termios.tcgetattr(sys.stdin) |
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
#!/bin/bash | |
main () { | |
print_runtime > /dev/null | |
print_runtime | |
} | |
print_runtime () { | |
pid=$(start_server) | |
runtime=$(time_command wait_for_server) |
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
#!/bin/bash | |
start=$1 | |
end=$2 | |
run() { | |
echo "Hash,XXX Count,Require Time,Ping Time,Prod Lines,Spec Lines,Spec Count,Spec Runtime,Spec End-to-End,Test doubles" | |
full_command="echo $hash,$xxx_count,$require_time,$ping_time,$prod_lines,$spec_lines,$spec_count,$spec_runtime,$spec_end_to_end,$test_doubles" | |
$(dirname $0)/run-command-on-git-revisions -v $start $end "$full_command" | |
} |
On the host machine:
mkdir ioc
docker run -it --name detector \
-v "$PWD/ioc":/ioc \
-e USER=root \
-w /ioc \
-p 8081:8081 \
-p 5064:5064 \
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
from __future__ import print_function | |
import os, os.path, sys, urllib2, requests | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def _chunk_report(bytes_so_far, chunk_size, total_size): |
sudo apt -y install dist-upgrade
sudo reboot
sudo apt -y upgrade
sudo apt -y install vim-nox tmux openssh-server
sudo apt -y install nvidia-361 # If you have an NVIDIA GPU
sudo reboot
sudo apt -y install aria2 # fast, resumable downloads
NewerOlder