Skip to content

Instantly share code, notes, and snippets.

/*
Erica Sadun, http://ericasadun.com
Cross Platform Defines
Apple Platforms Only
Will update to #if canImport() when available
*/
@vtajzich
vtajzich / Dockerfile
Created March 13, 2016 10:45
Polserver - dockerfile
FROM ubuntu
RUN apt-get update && apt-get -y upgrade && apt-get install -y git build-essential gcc bc cmake mc nano unzip
RUN mkdir /home/endor && mkdir /opt/pol
RUN git clone https://github.com/polserver/polserver.git /root/polserver
WORKDIR /root/polserver/lib
@vtajzich
vtajzich / nginx conf
Created December 6, 2015 20:40
How to enable ssl w/ nginx
server {
listen 80;
server_name your-domain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name your-domain.com;
@vtajzich
vtajzich / gist:a38fe74230b12cd366b0
Last active August 29, 2015 14:24
How to download a movies form regiojet train server :-)
class Movie {
String name
URL url
}
def downloads = new File('downloads')
downloads.mkdirs()
"http://portal.regiojet.cz/files/movies/".toURL().text.findAll(~/(?<=href=")([\S^"]*)(?=")/)
.parallelStream()
@vtajzich
vtajzich / gist:70d705f7ca93a2b360b1
Created September 18, 2014 12:24
Run mulptiple ES import scripts
File base = new File('<INSERT BASE DIR HERE>')
File data = new File(base, 'data')
File scripts = new File(base, 'scripts')
def isDone = { String name ->
return data.list().find { it == "${name}.csv.processing.imported"} != null
}
@vtajzich
vtajzich / build.sh
Last active May 21, 2019 07:45
Install & compile script fro ffmpeg on raspberry pi
#!/bin/bash
function install_build_tools {
sudo apt-get install git
sudo apt-get install libasound2-dev
sudo apt-get install build-essential
sudo apt-get install make
sudo apt-get install autoconf
sudo apt-get install libtool