Skip to content

Instantly share code, notes, and snippets.

View syntaxhacker's full-sized avatar
🧠
upgrading...

Rohit J syntaxhacker

🧠
upgrading...
View GitHub Profile
@syntaxhacker
syntaxhacker / color.js
Last active September 19, 2022 13:09
Cooolorrrsss
// generate list of random colors except blue rgb values until green is reached
let colors = [];
const numOfColors = 10;
const unDesirableColor = (color) => {
// if color is near blue or white return true
const rgb = color.split(',').map((val) => {
@syntaxhacker
syntaxhacker / capp_treemaps.py
Created March 3, 2022 22:07 — forked from gVallverdu/capp_treemaps.py
Treemaps with python and matplotlib
#!/usr/bin/env python3
# coding: utf-8
import matplotlib
import matplotlib.pyplot as plt
import pandas as pd
import squarify
import platform
# print versions
@syntaxhacker
syntaxhacker / config.py
Created November 22, 2021 18:07
send emails to gmail via python
username='' #email
password='' #password
# /usr/bin/env python
#
# Author: Red5d
#
# Description: Extract and run OCR on subtitles from a PGS-format .sup file.
#
# Example Usage: python sup2srt.py bd_subtitles.sup bd_subtitles.srt
#
# Dependencies:
# - pytesseract
@syntaxhacker
syntaxhacker / install_ffmpeg_libfdkaac.sh
Created January 6, 2021 10:12 — forked from rafaelbiriba/install_ffmpeg_libfdkaac.sh
Install FFmpeg with libfdk_aac support (For Ubuntu)
# Criando um script .sh para executar todos os comandos:
#root@servidor:~# vi script.sh
#root@servidor:~# chmod +x script.sh
#root@servidor:~# ./script.sh
apt-get update
apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
@syntaxhacker
syntaxhacker / command.txt
Created December 26, 2020 19:07 — forked from nrk/command.txt
Using ffprobe to get info from a file in a nice JSON format
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"
VBR="2500k"
FPS="30"
QUAL="veryfast"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
SOURCE="/tmp/Aot.mkv"
KEY=""
ffmpeg \
-stream_loop -1 -i "$SOURCE" -deinterlace \
@syntaxhacker
syntaxhacker / set-heroku-config-vars.sh
Last active January 3, 2021 19:36 — forked from tibawatanabe/set-heroku-config-vars.sh
Command line to set Heroku config vars
1. Export existing app’s variables to config.txt
heroku config -s -a existing-heroku-app > config.txt
2. Review and push to another app
cat config.txt | tr '\n' ' ' | xargs heroku config:set -a new-heroku-app
heroku container:login
@syntaxhacker
syntaxhacker / Flutterinstallwithoutandroidstudio.md
Last active October 8, 2024 11:00
setup flutter without android studio

Flutter install without android studio

set flutter

Download flutter

tar xvf flutter_linux_1.17.5-stable.tar.xz

declare namespace node_geocoder {
type Providers =
'freegeoip' | 'datasciencetoolkit' |
'locationiq' | 'mapquest' | 'openmapquest' |
'tomtom' | 'nominatimmapquest' |
'opencage' | 'geocodio' |
'yandex' | 'teleport' | 'pickpoint';
interface BaseOptions {