Skip to content

Instantly share code, notes, and snippets.

View milankragujevic's full-sized avatar

Milan Kragujević milankragujevic

View GitHub Profile
@andyboeh
andyboeh / enable_sshd.py
Created April 8, 2023 11:01
Enable SSHD on the Aclatel HH40V (modify backup file)
#!/usr/bin/env python
import os
import sys
import subprocess
import tempfile
import struct
import shutil
import hashlib
@gpchelkin
gpchelkin / dante_setup.sh
Last active August 22, 2023 06:45
How to Setup SOCKS5 Proxy Server for (not only) Telegram using Dante on Ubuntu 16.04 / 18.04 / 20.04
### NOT A SCRIPT, JUST A REFERENCE!
# install dante-server
sudo apt update
sudo apt install dante-server
# or download latest dante-server deb for Ubuntu, works for 16.04 / 18.04 / 20.04:
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/dante/dante-server_1.4.2+dfsg-7build5_amd64.deb
# or older version:
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb
@ashutosh-mishra
ashutosh-mishra / edit-init-rc.md
Last active March 13, 2024 07:22 — forked from azureru/extract android kernel.md
How to run custom script from init.rc, How to Extract Android Kernel And Modify The Boot Ramdisk(Android 4+)

init.rc changes

init.rc changes to run any script Can be used to start any android application, service

on property:dev.bootcomplete=1
    exec - system system -- /system/bin/sh <custom script path>
    # exec - system system -- /system/bin/sh /data/local/bootscript/testservice.sh

Script can contains applications start, stop commands

Introduction

Sometimes you may want to use a DNS server for specific domain requests and another DNS server for all other requests. This is helpful, for instance, when connected to a VPN. For hosts behind that VPN you want to use the VPN's DNS server but all other hosts you want to use Google's public DNS. This is called "DNS splitting."

Here, we run dnsmasq as a background service on macOS. The dnsmasq configuration described below implements DNS splitting.

Install

brew install dnsmasq
#!/usr/bin/perl -w
use IO::Socket ;
use IO::Handle ;
my $host = $ARGV[0] || "localhost";
my $port = $ARGV[1] || 8000;
STDERR->autoflush(1);
STDOUT->autoflush(1);
my $data = "";
@katallaxie
katallaxie / restart.sh
Created January 9, 2016 08:57
Automatically restart a CISCO 3208G on UMW
#!/bin/sh
usr=admin
pwd=atlanta
ip=192.168.0.1
tmp=/tmp/deviceRestart
cookies=cookies.txt
#improve the logread output
sqm_logger() {
@tiegz
tiegz / apa_1616_ir_codes.txt
Last active December 16, 2020 02:18
APA 1616 LED Remote IR Codes
# http://sztyled.en.made-in-china.com/product/SqUmJxylhbhK/China-24-Key-Infrared-RGB-Manual-Flash-Controller-APA-1616-.html
# or
# http://www.dhgate.com/store/product/advanced-micro-control-unit-24-keys-rgb-led/128629434.html
IR Receiver Notes
F700FF BRIGHT HI
F7807F BRIGHT LO
F7408F OFF
F7C03F ON
F720DF R1
@Vestride
Vestride / encoding-video.md
Last active April 24, 2024 09:59
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active November 12, 2023 23:00
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>