- Go to Digital Ocean
- Create new droplet
- London
- Ubuntu
- No apps
- Add SSH keys
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
#!/bin/sh | |
# latest trac! | |
wget "http://download.edgewall.org/trac/Trac-1.0.1.tar.gz" | |
tar xf Trac-1.0.1.tar.gz | |
cd Trac-1.0.1 |
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
#include <QDebug> | |
#include <QWidget> | |
#include <QNetworkReply> | |
#include <QSslConfiguration> | |
App::App(QWidget *parent) : | |
QWidget(parent), | |
ui(new Ui::App) | |
{ | |
ui->setupUi(this); |
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
"use strict"; | |
var vsm = require('lrs/virtualServerModule'); | |
var requestHandler = function(servReq, servResp, next){ | |
servReq.on('response', function responseHandler(cliResp){ | |
cliResp.bindHeaders(servResp); | |
servResp.removeHeader("Server"); | |
servResp.removeHeader("X-Powered-By"); |
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
all: lib run | |
lib: | |
g++ -shared -fPIC -o libhello.so libhello.cpp hello.cpp | |
run: | |
luajit main.lua | |
clean: | |
rm *.so |
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
// Faster solution for: | |
// http://www.boyter.org/2017/03/golang-solution-faster-equivalent-java-solution/ | |
// With threading. | |
// g++ -std=c++11 -Wall -Wextra -O3 -pthread | |
// On my computer (i5-6600K 3.50 GHz 4 cores), takes about ~160 ms after the CPU | |
// has warmed up, or ~80 ms if the CPU is cold (due to Turbo Boost). | |
// How it works: Start by generating a list of losing states -- states where the | |
// game can end in one turn. Generate a new list of states by running the game |
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
#Identify pupils. Based on beta 1 | |
import numpy as np | |
import cv2 | |
import time | |
cap = cv2.VideoCapture(0) #640,480 | |
w = 640 | |
h = 480 |
OlderNewer