Skip to content

Instantly share code, notes, and snippets.

@marcelog
marcelog / build_static_sox_binary.sh
Last active September 29, 2022 02:04
Build a static SOX binary suitable to be used in an AWS Lambda Container
cd /usr/src
wget "http://downloads.sourceforge.net/project/sox/sox/14.4.2/sox-14.4.2.tar.bz2?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fsox%2Ffiles%2Fsox%2F14.4.2%2F&ts=1476009578&use_mirror=ufpr" -O sox-14.4.2.tar.bz2
tar jxf sox-14.4.2.tar.bz2
cd sox-14.4.2
CPPFLAGS="-I/usr/libmad-0.15.1b/include -I/usr/lame-3.99.5/include " \
LDFLAGS="-L/usr/libmad-0.15.1b/lib -L/usr/lame-3.99.5/lib -L/usr/libgsm-1.0.10/lib" \
./configure --prefix=/usr/sox-14.4.2 --disable-shared --enable-static
make
make install
@snurhussein
snurhussein / PSPPConvert.md
Last active October 31, 2021 23:49
Using PSPP to convert sav files to csv

#Converting SPSS files to csv with PSPP#

Install and open PSPP Use the File menu to open your file (it probably has a .sav extension) Go to File>New>Syntax to open PSPP's command line window

Enter:

@shello
shello / randomEmoji.py
Last active October 5, 2023 09:16
Random Emoji! (for Python 3)
#!/usr/bin/env python3
from itertools import accumulate
from bisect import bisect
from random import randrange
from unicodedata import name as unicode_name
# Set the unicode version.
# Your system may not support Unicode 7.0 charecters just yet! So hipster.
UNICODE_VERSION = 6
@fspot
fspot / bottlequeue.py
Created June 7, 2013 08:20
Example app using bottle and multiprocessing for queuing long jobs and using several workers.
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Example app using bottle and multiprocessing for queuing long jobs
and using several workers.
"""
from multiprocessing import Process, Queue, cpu_count
from bottle import Bottle, run
@nerevar
nerevar / clear screen
Created July 15, 2012 20:00
Draws a colored horizontal line and clear screen of terminal
# рисует горизонтальную линию и очищает экран
c()
{
SEPARATOR="-"
WIDTH=$(tput cols);
echo -e "\033[$(($RANDOM % 7 + 31))m"
for ((i=0; i<$WIDTH; i++)); do echo -n $SEPARATOR ; done
clear
}