Skip to content

Instantly share code, notes, and snippets.

View cstroie's full-sized avatar

Costin Stroie cstroie

  • Bitdefender
  • Bucharest, Romania
View GitHub Profile
@cstroie
cstroie / ng_pod.py
Last active September 28, 2015 21:18
National Geographic's Picture of the Day downloader
#!/usr/bin/env python
#
# ng_pod.py
#
# Copyright 2011 Costin STROIE <[email protected]>
#
# NG_PoD is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@cstroie
cstroie / picasaweb_downloader.py
Created December 19, 2011 18:45
Download all the photos of a PicasaWeb album at specified resolution
#!/usr/bin/env python
#
# picasaweb_downloader.py
#
# Copyright 2011 Costin STROIE <[email protected]>
#
# This file is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@cstroie
cstroie / mmch.sh
Created December 28, 2011 12:09
MMCH comverter to MP4
#!/bin/bash
D="output"
mkdir -p "$D"
if [ ! "$1" ]
@cstroie
cstroie / recode.sh
Created December 28, 2011 12:12
Recode MP3 files with normalization
#!/bin/bash
#
# recode
#
# Copyright 2011 Costin STROIE <[email protected]>
#
@cstroie
cstroie / gist:2350707
Created April 10, 2012 11:35
Slugsy mail
#!/bin/sh
# Simple mail(1) replacement
# Software name and version
SWNAME="Slugsy-mail"
SWVER="0.1"
SWSIG="${SWNAME}/${SWVER}"
# From
FROM="`hostname -s`@`hostname -d`"
@cstroie
cstroie / all2email.sh
Created August 13, 2012 21:20
Create playlists with all available stations of sky.fm, di.fm and JazzRadio and send them by email
#!/bin/sh
# Create playlists with all available stations of sky.fm, di.fm and JazzRadio and send them by email
# Create all playlists
for station in sky di jazz
do
for format in mp3 aac
do
`dirname $0`/radio2playlist $station $format
done
@cstroie
cstroie / texi2book
Created August 28, 2013 13:26
Create A5 hardcopy books form GNU texinfo files
1. Add the @afivepaper command before the end of header.
2. Create the dvi file:
$ texi2dvi4a2ps FILE.texi
3. If needed, center the content:
$ dvips -t a5 -O -11mm,0mm -o FILE.ps FILE.dvi
4. Create the PostScript book:
$ cat FILE.ps | psbook -s4 | psnup -2 -Pa5 -m0 -d0 > FILE_book.ps
5. Create the PDF file:
$ ps2pdf -sPAPERSIZE=a4 -dPDFSETTINGS=/printer FILE_book.ps FILE_book.pdf
#!/bin/bash
# Convert all mjpg AVI movies created by Niokon camera to mp4
if [ ! "$1" ]
then
find . -iname '*.avi' -exec "$0" "{}" \;
exit 1
fi
I="$1"
B="${I##*/}"
#!/bin/sh /etc/rc.common
#
# Startup script for mjpg-streamer with file input plugin
#
START=50
STOP=50
PROG=/usr/bin/mjpg_streamer
start() {
start-stop-daemon -S -b -x "${PROG}" -- -i "input_file.so -f /tmp -n snapshot.jpg -d 5" -o "output_http.so -p 8090 -w /www/webcam -n"
METAR
=====
http://weather.noaa.gov/pub/data/observations/metar/decoded/LRBS.TXT
http://weather.noaa.gov/pub/data/observations/metar/stations/LRBS.TXT
TAF
===
http://weather.noaa.gov/pub/data/forecasts/taf/stations/LRBS.TXT
http://tgftp.nws.noaa.gov/data/forecasts/taf/stations/LRBS.TXT