Skip to content

Instantly share code, notes, and snippets.

View pedropapa's full-sized avatar
🏠
Working from home

Pedro Papadopolis pedropapa

🏠
Working from home
  • Sydney, Australia
View GitHub Profile
@pedropapa
pedropapa / conversation.html
Created August 14, 2017 12:37
Extrair quantitativos de conversa do whatsapp
<html>
<body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script type="text/javascript">
function indexes(source, find) {
var result = [];
for (i = 0; i < source.length; ++i) {
// If you want to search case insensitive use
// if (source.substring(i, i + find.length).toLowerCase() == find) {
f8bbcdcf0a30c780e516619fd88893d1
8fc758b5c164904d1292b0c41ebe9a49
c6f2c339da2677a780f50496183b4d76
8d86dca3a0e95a630f4cc3040883b57d
de7be52632359b65b00c5189448822c7
a333c413fa0fe98c0ac6864b1a3be4e8
9ddfda961f5f84cb437195677bae7753
a8cab95077cf66c58473f07130983e83
@pedropapa
pedropapa / gist:6ccde75a1069546a1d0beeef65144afa
Last active May 26, 2017 14:14
Installing oracle's instantclient 12.1c and php (installed via brew) oci8 driver OS X
Prerequisites:
1. PECL installed: https://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/
PHP 5.6
1. Go to http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
2. Click "Instant Client for Mac OS X (Intel x86) (32-bit and 64-bit)"
3. Download instantclient-basic-macos.*
4. Download instantclient-sqlplus-macos.*
5. Download instantclient-sdk-macos.*
6. Extract all packages.
@pedropapa
pedropapa / gist:20f1e5a7569b844b06fb9c496815b053
Created February 16, 2017 19:47
Redirect lan port to internal IP (macOS)
1. Go to system preferences > sharing.
2. Enable remote login.
3. Execute the following command on terminal: ssh -L lan_ip:lan_port:redirect_ip:redirect_port -N 127.0.0.1
4. Example: ssh -L 192.168.200.120:10000:mma-hmg:80 -N 127.0.0.1
@pedropapa
pedropapa / gist:5b0a4666f70d0567d7a7d98a5b5b84c0
Last active February 27, 2018 00:32
Xys PHP installation - Homebrew (macOS)
PHP 7.1:
brew install php71 --with-httpd24 --with-pdo-oci
brew install --build-from-source php71-imagick php71-apcu php71-gearman php71-igbinary php71-mcrypt php71-mongodb php71-opcache php71-pdo-dblib php71-pdo-pgsql php71-redis
PHP 5.6:
brew install php56 --with-httpd24
brew install --build-from-source php56-imagick php56-apcu php56-gearman php56-igbinary php56-mcrypt php56-mongo php56-mongodb php56-opcache php56-pdo-dblib php56-pdo-pgsql php56-redis
PHP 5.3:
brew install php53 --with-httpd24 --with-postgresql
Installing avconv with all dependencies for video conversion/encoding:
(macOS) brew reinstall libav --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
Start encoding worker:
php app/console gearman:worker:run src/Core/VideoBundle/Worker/EncodeVideoWorker.php
Example of manually encoding an uploaded video:
avconv -i /usr/local/var/www/htdocs/Xys/xcorp/web/upload/video/encoded/e6/e0/e6e0082c-a38b-4984-93f6-15bc895f057c -acodec libvorbis -y /usr/local/var/www/htdocs/Xys/xcorp/web/upload/video/encoded/e6/e0/e6e0082c-a38b-4984-93f6-15bc895f057c.webm
@pedropapa
pedropapa / gist:90de1dfdf53fbbdf514c45cfc140a9ad
Last active January 22, 2025 08:27
Ranking de contribuidores da board PT/BR do fórum do SA-MP
Atualizado em: 04/08/2017 16:47
Código utilizado para extrair o ranking: https://gist.github.com/pedropapa/fa2fc88c5bbde357bf707139a5bbd54c
==========================================================================================================================================
1º: ipsBruno | Contribuições: 125 | Visualizações 608586 | Respostas 3566
Contribuições:
Tutorial:
@pedropapa
pedropapa / rankingExtractor.js
Last active September 25, 2017 17:25
PT/BR SA-MP forums board contributors extrator
/**
* ATENÇÃO: NÃO EXECUTE O SCRIPT LOGADO EM SUA CONTA DO FÓRUM, E NÃO EXECUTE SE TIVER IP FIXO. A QUANTIDADE DE REQUISIÇÕES QUE SÃO FEITAS DURANTE A EXECUÇÃO DO SCRIPT PODE FAZER COM QUE SEU IP SEJA BANIDO.
*
* Como executar:
*
* 1. Abra o Google Chrome.
* 2. Navegue até o início da board pt/br do fórum (http://forum.sa-mp.com/forumdisplay.php?f=56)
* 3. Abra o console do navegador (Windows: ctrl + shift + K, MacOS: command + shift + K).
* 4. Copie e cole este script no navegador
* 5. Aperte enter para executar
@pedropapa
pedropapa / index.js
Last active December 8, 2016 19:09
Verifica se uma determinada transação entre contas de um determinado valor foi realizado
var verifyPayment = require('./verifyPayment');
verifyPayment('1HJBhjzp8QJrVrrFH3eZWVFtiHdTCWU82f', '1Hw1v4rqWqib351iBDx6JoFrFVX4oVu5S5', 0.004036, function(tx) {
console.log('Pagamento identificado! depositar créditos');
})
zen
Hatha Cass Lake MN - Clip
Roller - Clip
Yin Yoga - Hip Opener Flow - Clip
Hand Flow - Clip
Hatha Peace and Gratitiude - 2 min
Vinyasa - Clip
Advanced Sun Salutations - Clip
Beginning Sun Salutations - Clip
Vinyasa Flow - All The Good - Clip