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
# For those attempting to install and use it on Linux, this is a quick howto (not really a bash script): | |
# 1. Download and install Steam with wine | |
# 2. Start steam and install sailaway | |
wine Steam.exe | |
# 3. Now wine will automatically use the wrong version of directx (d3d11); open winecfg, go to libraries, in | |
# "New override library" search for d3d11 and click "Add". Then click in d3d11 in "Existing override" and click "Edit" | |
# then switch the combo to "Disable"; press on "Apply" and close winecfg |
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
/* Execute a promise list, n at time */ | |
Promise.prototype.allStep = (promiseList, n) => { | |
let promises = []; | |
for (let i = 0; i < promiseList.length; i+=n) { | |
promises.push (new Promise ((resolve, reject) => { | |
var p = promiseList.slice (i, i+n ? i+n <= promiseList.length : promiseList.length); | |
Promise.all (p).then ((r) => { | |
resolve (r); |
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
ssh root@vps -L9305:127.0.0.1:9306 |
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
package=boost | |
$(package)_version=1_62_0 | |
$(package)_download_path=http://sourceforge.net/projects/boost/files/boost/1.62.0 | |
$(package)_file_name=$(package)_$($(package)_version).tar.bz2 | |
$(package)_sha256_hash=36c96b0f6155c98404091d8ceb48319a28279ca0333fba1ad8611eb90afb2ca0 | |
$(package)_patches=deprecated_auto_ptr.patch | |
define $(package)_set_vars | |
$(package)_config_opts_release=variant=release | |
$(package)_config_opts_debug=variant=debug |
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
#define HASH_SIZE 32 | |
typedef struct block_t { | |
data: uint8_t [HASH_SIZE]; | |
}; | |
void hash (uint8_t *data, block_t *h) { | |
} |
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
import random | |
betRange = [79.0, 81.0] | |
def doBet (bet, winRange, mul): | |
r = random.randint (1, 9999) / 100.0 | |
if r >= winRange[0] and r <= winRange[1]: | |
return bet * mul | |
else: | |
return -bet |
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/python2 | |
import urllib2 as ul2 | |
import time | |
while True: | |
ip = ul2.urlopen('http://ipecho.net/plain').read() | |
f = open('/home/dak/Dropbox/ip.txt','w') | |
f.write(ip) | |
f.close() | |
time.sleep (60) |
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
x = -1.01:.001:1.01; | |
y = 4/5*(sqrt(1-x.^2) + sqrt(abs(x))); | |
z = 4/5*(-sqrt(1-x.^2) + sqrt(abs(x))); | |
plot(x,y,'r'); | |
plot(x,z,'r'); | |
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 <stdio.h> | |
#include <malloc.h> | |
#define N 8 | |
/** Recursive delete like a pro | |
* where: 'ar' is the array, 'n' is the size, 'start' is 0 when | |
* called first time, 'irem' is the index of element to remove. | |
* @return the new size of the array (n-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 <stdio.h> | |
#include <malloc.h> | |
#define N 9 | |
#define M 5 | |
void print_ar (int *a, int n) | |
{ | |
for (int i=0;i<n;i++) printf ("%d ", a[i]); |