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
Text | |
Ny rad |
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
DROP TABLE IF EXISTS foo ; | |
CREATE TABLE foo( | |
id serial primary key, | |
body text | |
); | |
INSERT INTO foo (body) values ('blabal'); | |
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
require 'json' | |
require 'time' | |
counting_hash = Hash.new(0) | |
line_enumerator = STDIN.each_line | |
line_enumerator.each do |line| | |
puts line | |
end |
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
# https://streamlink.github.io/ | |
tw() { | |
TMPFILE=`mktemp` | |
echo $TMPFILE | |
vlc $TMPFILE & | |
streamlink --hls-segment-threads 10 -f -o $TMPFILE $1 best | |
} |
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
2016-12-27 20:49:17 1.5 GiB pbfs/africa-161201.osm.pbf | |
2016-12-27 20:49:27 28.9 MiB pbfs/antarctica-161201.osm.pbf | |
2016-12-27 20:49:27 4.5 GiB pbfs/asia-161201.osm.pbf | |
2016-12-27 20:49:59 493.6 MiB pbfs/australia-oceania-161201.osm.pbf | |
2016-12-27 20:50:02 248.9 MiB pbfs/central-america-161201.osm.pbf | |
2016-12-27 20:50:04 18.0 GiB pbfs/europe-161201.osm.pbf | |
2016-12-27 20:52:05 7.5 GiB pbfs/north-america-161201.osm.pbf | |
2016-12-27 20:52:57 981.0 MiB pbfs/south-america-161201.osm.pbf | |
Total Objects: 8 |
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
sudo yum update # -yes? | |
sudo yum groupinstall "Development Tools" | |
sudo yum install openssl-devel htop | |
mkdir install | |
cd install | |
wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.41.tar.gz | |
tar -xvzf pure-ftpd-1.0.41.tar.gz | |
cd pure-ftpd-* | |
./configure --with-tls --with-ftpwho --with-puredb --without-pam | |
make |
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
require 'open3' | |
module Enumerable | |
alias :all_are? :all? | |
end | |
Open3.popen3(%(ruby -e 'STDOUT.sync = true; STDERR.sync = true;3.times { |i| STDOUT.puts(i); STDERR.puts(i); sleep 1 }')) do |stdin, stdout, stderr, wait_thr| | |
maxlen = 1024 | |
pipes = { | |
stdout => :stdout, |
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 zlib | |
from imposm.parser.pbf.parser import PBFFile, PrimitiveBlockParser | |
import imposm.parser.pbf.parser | |
import imposm.parser.pbf | |
import StringIO | |
import cachetools | |
import bisect | |
import sys | |
import resource | |
import random |
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
require 'open-uri' | |
require 'nokogiri' | |
date = (Date.today - 2).strftime("%y%m%d") | |
paths = %w( | |
africa | |
asia | |
australia-oceania | |
central-america | |
europe |
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
parallel_fetch(ServerPid, FirstKey, SecondKey, ThirdKey) -> | |
FirstRequestId = make_ref(), | |
SecondRequestId = make_ref(), | |
ThirdRequestId = make_ref(), | |
ServerPid ! {self(), FirstRequestId, FirstKey}, | |
ServerPid ! {self(), SecondRequestId, SecondKey}, | |
ServerPid ! {self(), ThirdRequestId, Thirdkey}, | |
FirstValue = receive |
NewerOlder