Skip to content

Instantly share code, notes, and snippets.

https://www.linuxbabe.com/ubuntu/install-linux-kernel-4-10-ubuntu-16-04-ukuu

http://old-releases.ubuntu.com/releases/16.04.2/ https://en.wikipedia.org/wiki/Ubuntu_version_history#Table_of_versions http://www.omgubuntu.co.uk/2016/10/download-ubuntu-16-10-new-features

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8/linux-headers-4.8.0-040800-generic_4.8.0-040800.201610022031_amd64.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8/linux-headers-4.8.0-040800_4.8.0-040800.201610022031_all.deb
@sithu
sithu / q2.py
Created August 31, 2017 03:35
Quizz 2 Baseline
import requests
def http_call_sync():
r = requests.get('https://httpbin.org/status/200')
print(r.status_code)
r = requests.get('https://httpbin.org/status/204')
print(r.status_code)
def http_call_async():
@sithu
sithu / latency.py
Last active February 4, 2018 05:15
In-class Exercise 1
"""
Question:
Pick one IP from each region, find network latency from via the below code snippet
(ping 3 times), and finally sort the average latency by region.
http://ec2-reachability.amazonaws.com/
Expected Output for all 15 regions:
1. us-west-1 [50.18.56.1] - 100ms (Smallest average latency)
2. xx-xxxx-x [xx.xx.xx.xx] - 200ms
3. xx-xxxx-x [xx.xx.xx.xx] - 300ms
0x0006eC2E5Ca955d38cA133FBf440DDFab050804e
chain: ropsten
# Use automated Chrome to verify all contracts on etherscan.io
# You need to install Splinter package:
# pip install splinter
verify_on_etherscan: no
browser_driver: chrome
contracts:
chain: ropsten
# Use automated Chrome to verify all contracts on etherscan.io
# You need to install Splinter package:
# pip install splinter
verify_on_etherscan: no
browser_driver: chrome
contracts:
0x0c8cf01ae70831ac018160ffeedf2033b3364d7d
@sithu
sithu / gist:f9b3c67871ee2d3ec13c382fd1d93511
Created August 1, 2017 06:06 — forked from Bouke/gist:11261620
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9

HelloWorld.deployed().then(helloworld=> console.log(helloworld.balance.call()))
// OR
HelloWorld.deployed().then(function(instance){helloworld=instance})
// THEN
helloworld.balance.call()
@sithu
sithu / grafana-backup.sh
Created July 15, 2017 06:31 — forked from piotr1212/grafana-backup.sh
Grafana sqlite backup script
cat /usr/share/grafana/grafana-backup.sh
#!/bin/bash
DB="/var/lib/grafana/grafana.db"
BACKUP="/data/backup/grafana/grafana.db-$(date +%Y%m%d).bck"
SQLITE=/usr/bin/sqlite3
ZIP=/bin/gzip
${SQLITE} ${DB} ".backup ${BACKUP}"
${ZIP} ${BACKUP}