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/bash | |
base=/var/hls | |
mkdir -p $base | |
cd $base | |
raspivid -n -w 720 -h 405 -fps 25 -vf -t 86400000 -b 1800000 -ih -o - \ | |
| ffmpeg -y \ |
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
[Unit] | |
Description=hls: starts hls service | |
After=nginx.service | |
[Service] | |
Type=forking | |
User=www-data | |
ExecStart=/usr/local/bin/hls.sh | |
Restart=on-failure | |
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/bash --debugger | |
set -e | |
BRANCH="master" | |
if grep -q BCM2708 /proc/cpuinfo; then | |
echo "RPI BUILD!" | |
RPI="1" | |
fi | |
[ -n "$1" ] && BRANCH=$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
import sys | |
import requests | |
import urllib | |
pagename = str( ' '.join( sys.argv[1:] ) ) | |
wikiurl = "https://es.wikipedia.org/w/api.php?action=query&format=json&titles="+urllib.quote_plus( pagename )+"&prop=extracts&exintro&explaintext&redirects=true" | |
r = requests.get(wikiurl) |
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/env perl | |
use Data::Dumper; | |
use Text::Trim; | |
use POSIX; | |
use List::Util qw(shuffle); | |
my $file = shift; | |
my @struct; | |
my @groups; |
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/env perl | |
# Script for exporting MySQL tables into a CSV. | |
use strict; | |
use warnings; | |
use DBI; | |
use Text::CSV; | |
use JSON qw( decode_json ); |
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
<?php | |
# Based on https://secure.php.net/manual/en/class.recursivedirectoryiterator.php#111142 | |
# Based on https://stackoverflow.com/questions/834303/startswith-and-endswith-functions-in-php | |
$hidden = false; | |
if ( count( $argv ) > 1 ) { | |
$ritit = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($argv[1], RecursiveIteratorIterator::SELF_FIRST) ); | |
$r = array(); |
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/env perl | |
# List of IDs - one per line | |
my $list = shift; | |
# File with potential IDs, it can be GFF but also othersH | |
my $gff = shift; | |
my @ids; | |
open( LIST, $list ) || die "Cannot open $list"; |
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
# -*- coding: utf-8 -*- | |
""" | |
Pergola webservice client | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
More details at: https://pergola.crg.eu | |
Usage: python pergola-webservice.py myconfig.json myoutput.zip | |
""" | |
import requests | |
import json | |
import sys |
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
FROM mariadb:10.1 | |
# To be changed here | |
ENV MYSQL_UID 27 | |
ENV MYSQL_GID 27 | |
RUN usermod -u $MYSQL_UID mysql; groupmod -g $MYSQL_GID mysql; | |
RUN chown -R mysql:mysql /var/lib/mysql /var/run/mysqld |