Skip to content

Instantly share code, notes, and snippets.

View ficosta's full-sized avatar
🤓

Felipe Iasi de Barros Costa ficosta

🤓
  • São Paulo / Brasil
View GitHub Profile
db.define_table('room',
Field('room_no'),
Field('category', 'list:string'),
Field('status', 'list:string'),
Field('branch', 'reference branch'),
format=lambda r: '%s %s' % (r.branch.address, r.room_no))
#coding: utf-8
import socket
import random, math
from hashlib import sha1
from hmac import new as hmac
generateHash = lambda(placa): hmac("shienshenlhq",placa,sha1).digest().encode('hex')
rLong = lambda(raio): '%.7f' % (( raio/111000.0 * math.sqrt(random.random()) ) * math.sin(2 * 3.141592654 * random.random()) + (-38.5290245))
apt-get update
apt-get install vim
apt-get install htop
wget http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
chmod +x setup-web2py-ubuntu.sh
./setup-web2py-ubuntu.sh
@ficosta
ficosta / full-ffmpeg.sh
Last active November 29, 2017 10:26
Install full ffmpeg in debian wheezy (with aac(m4a) and x264 support)
# Add multimedia source
echo "deb http://www.deb-multimedia.org stretch main non-free" >> /etc/apt/sources.list
echo "deb-src http://www.deb-multimedia.org stretch main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src
@ficosta
ficosta / gist:764bea44a492ebf1620a560e8d98ee63
Created November 29, 2017 17:48 — forked from faleev/gist:3435377
Compile FFmpeg on Ubuntu

Compile FFmpeg on Ubuntu

This guide supports Ubuntu Precise Pangolin 12.04, Ubuntu Oneiric Ocelot 11.10, Ubuntu Natty Narwhal 11.04, and Ubuntu Maverick Meerkat 10.10. Separate guides are available for Ubuntu Lucid Lynx 10.04 and Ubuntu Hardy Heron 8.04. This guide will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the [Filtering Guide](https://ffmpeg.org/trac/ffmpeg/wiki/Fi

@ficosta
ficosta / install_ffmpeg.py
Created December 13, 2017 19:39 — forked from santazhang/install_ffmpeg.py
Python script to compile and install ffmpeg
#!/usr/bin/env python
#
# Python script to compile and install ffmpeg.
#
# part of ffcluster project.
# see full project at github.com/santazhang/ffcluster
#
# Author: Santa Zhang <[email protected]>
import os
from TwitterAPI import TwitterAPI
import json
api = TwitterAPI('', '', '', '')
next_cursor = '-1'
for x in range(0, 46):
r = api.request('followers/list', {'screen_name':'canalarte1','include_user_entities':'true','count':'200','cursor':next_cursor})
userlist = json.loads(r.text)