I hereby claim:
- I am dyladan on github.
- I am dyladan (https://keybase.io/dyladan) on keybase.
- I have a public key ASCQJRskHagulIcF37NVYMsR_g_rZpBY3PmbSEtbbtFvSgo
To claim this, I am signing this object:
require 'bencode' | |
require 'fileutils' | |
Dir.glob('torrents/*.torrent') do |item| | |
if File.directory?(item) | |
next | |
end | |
tracker = BEncode.load_file(item)["announce"].gsub("http://", "").split('/')[0] | |
if tracker == nil |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.company.xprotect_re-enable_java_6_and_7</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>sh</string> | |
<string>/Library/Scripts/xprotect_re-enable_java_6_and_7.sh</string> |
<video> | |
<source src="movie.webm" type='video/webm; codecs="vp8, vorbis"' /> | |
<source src="movie.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> | |
<source src="movie.ogv" type='video/ogg; codecs="theora, vorbis"' /> | |
Video tag not supported. Download the video <a href="movie.webm">here</a>. | |
</video> |
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
FILE="/var/swap-$$.img" | |
read -p "Size in MB: " SWAPSIZE | |
echo "Creating file $FILE" | |
touch $FILE | |
echo "Allocate $SWAPSIZE MB space for swap on $FILE" |
boards = [(a,b,c,d,e,f,g,h) | | |
a <- [1..8], | |
b <- [x | x <- [1..8], x /= a, x /= a+1, x /= a-1], | |
c <- [x | x <- [1..8], x /= a, x /= a+2, x /= a-2, x /= b, x /= b+1, x /= b-1], | |
d <- [x | x <- [1..8], x /= a, x /= a+3, x /= a-3, x /= b, x /= b+2, x /= b-2, x /= c, x /= c+1, x /= c-1], | |
e <- [x | x <- [1..8], x /= a, x /= a+4, x /= a-4, x /= b, x /= b+3, x /= b-3, x /= c, x /= c+2, x /= c-2, x /= d, x /= d+1, x /= d-1], | |
f <- [x | x <- [1..8], x /= a, x /= a+5, x /= a-5, x /= b, x /= b+4, x /= b-4, x /= c, x /= c+3, x /= c-3, x /= d, x /= d+2, x /= d-2, x /= e, x /= e+1, x /= e-1], | |
g <- [x | x <- [1..8], x /= a, x /= a+6, x /= a-6, x /= b, x /= b+5, x /= b-5, x /= c, x /= c+4, x /= c-4, x /= d, x /= d+3, x /= d-3, x /= e, x /= e+2, x /= e-2, x /= f, x /= f+1, x /= f-1], | |
h <- [x | x <- [1..8], x /= a, x /= a+7, x /= a-7, x /= b, x /= b+6, x /= b-6, x /= c, x /= c+5, x /= c-5, x /= d, x /= d+4, x /= d-4, x /= e, x /= e+3, x /= e-3, x /= f, x /= f+2, x /= f-2, x /= g, x /= g+1, x /= g-1]] |
[root@arch bookie]# make run | |
BOOKIE_INI=bookie.ini bin/python bin/celery worker --app=bookie.bcelery -B -l debug --pidfile celeryd.pid & | |
bin/python bin/pserve --reload bookie.ini | |
make: bin/python: Command not found | |
Makefile:353: recipe for target 'run_app' failed | |
make: *** [run_app] Error 127 | |
[root@arch bookie]# /bin/sh: bin/python: No such file or directory |
import csv, sqlite3 | |
con = sqlite3.connect("logstats.sqlite") | |
cur = con.cursor() | |
cur.execute("""\ | |
CREATE TABLE messages ( | |
time DATETIME NOT NULL, | |
server VARCHAR NOT NULL, | |
chan VARCHAR NOT NULL, | |
nick VARCHAR NOT NULL, |
I hereby claim:
To claim this, I am signing this object:
/* | |
* First, we will declare some asynchronous functions to consume. | |
* These actually do not make asynchronous calls, but they illustrate | |
* the idea. | |
*/ | |
// Callback style asynchronous function | |
function callbackAsyncFunction(val1, val2, callback) { | |
//processing | |
if (!val1) { |
const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus'); | |
const { MeterProvider } = require('@opentelemetry/metrics'); | |
const { Resource } = require('@opentelemetry/resources'); | |
// Add your port and startServer to the Prometheus options | |
const options = {port: 9464, startServer: true}; | |
const exporter = new PrometheusExporter(options); | |