sudo adduser ubuntu tty
mkdir -p ~/Downloads && cd ~/Downloads
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb && rm cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install cuda xserver-xorg-legacy xfce4 x11vnc
mkdir ~/.x11vnc && x11vnc -storepasswd "password" ~/.x11vnc/passwd
This file contains 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 python | |
import json | |
import requests | |
import sys | |
APIKEY = "xxx" | |
def create_domain_record(domain, name, rrtype, ttl, values): | |
r = requests.post("https://dns.api.gandi.net/api/v5/domains/%s/records" % domain, |
This file contains 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
<?php | |
class DB{ | |
//variable to hold connection object. | |
protected static $db; | |
//private construct - class cannot be instatiated externally. | |
private function __construct() { | |
try { | |
// assign PDO object to db variable | |
self::$db = new PDO( 'mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PASS ); | |
self::$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); |