Skip to content

Instantly share code, notes, and snippets.

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

maulvi

🏠
Working from home
View GitHub Profile
@plembo
plembo / tigervnconubuntu.md
Last active January 26, 2024 16:21
Install tigervnc on Ubuntu

NOTE: Given its current state, I've given up on tigervnc and now rely on "ssh -X" to execute remote gui apps. As a result I won't be updating this gist any more, but will leave it up as a reference for others.

Installing TigerVNC on Ubuntu 18.04 LTS

This is for Ubuntu 18.04 LTS. TigerVNC is a remote desktop session server and viewer solution sponsored by Red Hat that is still in active development. While I recently tested under Ubuntu 19.10, I have no plans to test non-LTS versions in the future.

There are packages for TigerVNC in the repositories of the major distributions, but the latest versions for Ubuntu are broken. My workaround is to use the latest stable version from the TigerVNC project Github release page, where generic binaries for 32 and 64-bit Linux are distributed as tarballs (dmg and exe installers for Mac and Windows are also available).

NOTE: A key file is missing from the latest offici

@ve3
ve3 / Encryption.js
Last active August 10, 2023 10:51
Encrypt and decrypt between programming languages (PHP & JavaScript). (Newer version here https://gist.github.com/ve3/b16b2dfdceb0e4e24ecd9b9078042197 )
/**
* Encryption class for encrypt/decrypt that works between programming languages.
*
* @author Vee Winch.
* @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference.
* @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here.
*/
class Encryption {
@dwisiswant0
dwisiswant0 / wifi.id_Account_Checker.md
Last active January 15, 2020 06:33
@wifi.id Account Checker API
@vincentius15
vincentius15 / Client.py
Last active June 3, 2018 15:48
Chat Protocol
import socket
import select
import sys
from threading import *
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_address = ("localhost", 14000)
client.connect(server_address)
@ChronoMonochrome
ChronoMonochrome / iptables-redsocks.sh
Last active March 7, 2023 16:00
RedSocks proxy for Linux
#!/bin/bash
# Create new chain
sudo iptables -t nat -N REDSOCKS
# Ignore LANs and some other reserved addresses.
sudo iptables -t nat -A REDSOCKS -d 0.0.0.0/8 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 10.0.0.0/8 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 127.0.0.0/8 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 169.254.0.0/16 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 172.16.0.0/12 -j RETURN
@0xallie
0xallie / lossless-stream-rip-cheatsheet.md
Last active April 3, 2024 06:11
Lossless stream rip cheatsheet

Lossless stream rip cheatsheet

Note: This guide may be slightly outdated. It may be still useful for older releases, but nowadays the vast majority of releases are correctly tagged as WEB-DL (unless it's RARBG/rartv). Protip: prefer looking at file names instead of release names, as they tend to be more accurate.

This is a short cheatsheet to help you determine whether a release from Amazon, Hulu, or Netflix contains the lossless/untouched (as in no further loss of quality compared to what the streaming services provide) video/audio or not. Most newer P2P releases are correctly tagged, but for older releases, it cannot be reliably determined based on the tags alone.

In most cases, non-lossless rips from these services are screen captures (which, when done by professional releasers, should be high quality and contain little to no glitches – see the history section for details), but in some cases they may be simply reencoded from the untouched stream, for example to crop black bars or reencode from a

@vijayantkatyal
vijayantkatyal / live.sh
Created May 6, 2017 09:29
Live Video Stream to Facebook
# stream video
ffmpeg -re -i live.mp4 -c:v libx264 -preset veryfast -maxrate 3000k \
-bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 \
-ar 44100 -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/"
# stream desktop
ffmpeg -video_size 1366x768 -framerate 25 -f x11grab -i :0.0 -ar 44100 -f alsa -ac 2 -i hw:0 -preset ultrafast output.mp4 -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/"

How to install dlib v19.9 or newer (w/ python bindings) from github on macOS and Ubuntu

Pre-reqs:

  • Have Python 3 installed. On macOS, this could be installed from homebrew or even via standard Python 3.6 downloaded installer from https://www.python.org/download. On Linux, just use your package manager.
  • On macOS:
    • Install XCode from the Mac App Store (or install the XCode command line utils).
    • Have homebrew installed
  • On Linux:
@cgoldberg
cgoldberg / geckodriver-install.sh
Last active August 18, 2023 10:20
download and install latest geckodriver for linux or mac (selenium webdriver)
#!/bin/bash
# download and install latest geckodriver for linux or mac.
# required for selenium to drive a firefox browser.
install_dir="/usr/local/bin"
json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest)
if [[ $(uname) == "Darwin" ]]; then
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos"))')
elif [[ $(uname) == "Linux" ]]; then
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))')