Skip to content

Instantly share code, notes, and snippets.

zital ZiTAL

Block or report user

Report or block ZiTAL

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ZiTAL
ZiTAL / docker.sh
Last active Nov 15, 2019
docker laradock
View docker.sh
# nginx martxan imiñi
docker-compose up -d nginx
# docker-en kontenedoriek gelditsu
docker-compose stop
# bash-era konekta
docker-compose exec -u laradock workspace bash
@ZiTAL
ZiTAL / ffmpeg_compilation.sh
Last active Nov 6, 2019
ffmpeg: debian compilation
View ffmpeg_compilation.sh
#!/bin/bash
su
aptitude install libmp3lame0 libavcodec-extra-52 libavcodec-extra-56 libavcodec-dev libavcodec-extra libavcodec-extra-56 libavcodec56 libavformat-dev libavformat56 libavutil-dev libavutil54 libavfilter libavfilter5 libavfilter-dev libavdevice-dev libavdevice55 libswscale-dev libswscale3 libchromaprint-dev frei0r-plugins-dev libfrei0r-ocaml-dev libgmp-dev libgmp3-dev libgnutls28-dev ladspa-sdk libiec61883-dev libiec61883 libiec61883-0 libass-dev libbluray-dev libbs2b-dev libebur128-dev ebumeter libfdk-aac-dev libflite1 libgme-dev libgsm1-dev libmodplug-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libopencv-dev libopenjpeg-dev libopus-dev librtmp-dev librubberband-dev libschroedinger-1.0-0 libshine-dev libsmbclient-dev libsnappy-dev libsoxr-dev libssh-dev libssh2-1-dev libspeex-dev libtesseract-dev tesseract-ocr-dev libtheora-dev libtwolame-dev libv4l-dev libvo-amrwbenc-dev libvorbis-dev libvpx-dev libwavpack-dev libwebp-dev libx264-dev libxvidcore-dev libzmq-dev libzvbi-dev
@ZiTAL
ZiTAL / index.php
Last active Oct 28, 2019
php: telegram bot api example
View index.php
<?php
// get API KEY: https://core.telegram.org/bots#botfather
// get chad id: http://stackoverflow.com/questions/31078710/how-to-obtain-telegram-chat-id-for-a-specific-user
$api_key = 'FAKE1234';
$chat_id = '7850602'
$url = "https://api.telegram.org/bot".$api_key."/";
// UNCOMMENT desired method
View gist:c5d5dd6c42f7b898ab5d7b1a9851c62c
ffmpeg -y -i input01.mp3 -i input02.mp3 -filter_complex "[0:a][1:a] amix=inputs=2:duration=longest[a]" -map "[a]" output.mp3
@ZiTAL
ZiTAL / ws-cli.php
Created Oct 29, 2014
php: simple websocket client
View ws-cli.php
<?php
/*
based on: http://stackoverflow.com/questions/7160899/websocket-client-in-php/16608429#16608429
FIRST EXEC PYTHON SCRIPT TO GET HEADERS
*/
$ws = new ws(array
(
'host' => '127.0.0.1',
'port' => 8080,
@ZiTAL
ZiTAL / settings.json
Created Sep 30, 2019
vscode: enable search files listed in .gitignore
View settings.json
"search.useIgnoreFiles": false
@ZiTAL
ZiTAL / vscode_arduino.sh
Last active Sep 27, 2019
vscode arduino install instructions
View vscode_arduino.sh
# root moduen logie
su
# zital erabiltzailie dialout taldien sartun
usermod -a -G dialout zital
# zital erabiltzailie tty taldien sartun
usermod -a -G tty zital
# serial eta pyserial python3-tik kendu
pip3 uninstall serial pyserial
# esptool instalav
pip3 install esptool
@ZiTAL
ZiTAL / fstab
Created Sep 2, 2019
php: nfs Warning: file_put_contents(): Exclusive locks are not supported for this stream
View fstab
10.217.252.83:/home/projects /home/projects nfs rw,tcp,nolock,noacl,async,user,exec 0 0
@ZiTAL
ZiTAL / composer.sh
Last active Aug 28, 2019
php: composer install globally
View composer.sh
su
cd /tmp
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer
cd -
exit
@ZiTAL
ZiTAL / cookie_exists.js
Created Aug 9, 2019
js: cookie exists
View cookie_exists.js
You can’t perform that action at this time.