Skip to content

Instantly share code, notes, and snippets.

View CypherpunkSamurai's full-sized avatar
😶
Currently Busy 🌻🐢

Cypherpunk Samurai CypherpunkSamurai

😶
Currently Busy 🌻🐢
View GitHub Profile
@marcellodesales
marcellodesales / formatted.sh
Last active November 14, 2023 19:22
One-liner REST server using netcat - nc
rm -f out
mkfifo out
trap "rm -f out" EXIT
while true
do
cat out | nc -w1 -l 1500 > >( # parse the netcat output, to build the answer redirected to the pipe "out".
export REQUEST=
while read line
do
line=$(echo "$line" | tr -d '[\r\n]')
@dingledow
dingledow / android_emulator_paste_test
Last active September 1, 2023 10:33
Paste Text on Android Emulator
adb shell input text 'my string here. With some characters escaped like \$ that'
@indraniel
indraniel / tumblr-download.go
Last active September 5, 2021 06:36
A golang program to download pictures from a tumblr blog page
/*
This is a go program to download pictures from a tumblr blog page.
To Build:
go build -o tumblr-download tumblr-download.go
To Run:
# download the photos on the first page of tumblr blog
@rochacon
rochacon / cmd-to-websocket.go
Created December 8, 2014 20:17
Stream a command stderr and stdout throught websockets
package main
import (
"bufio"
"fmt"
"github.com/gorilla/websocket"
"io"
"log"
"net/http"
"os/exec"
@abhishekkr
abhishekkr / tcp_client.go
Last active January 29, 2025 10:12
simple golang's net example
package main
import (
"fmt"
"io/ioutil"
"net"
"os"
)
const (
@ph0b
ph0b / build.gradle
Last active February 12, 2023 07:45
sample build.gradle for generating split APKs per ABI
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig{
minSdkVersion 14
targetSdkVersion 21
versionCode 101
@Fornoth
Fornoth / Notes.md
Last active December 9, 2024 16:02
Makes a device show up in spotify connect devices list, but nothing else yet

#Python Script Setup

To get the python script running, run either pip install flask or pip install -r requirements.txt if you used git clone to clone the gist

#libspotify_embedded_shared.so notes

##Using the library (still in progress) There's a compile.sh that compiles a program that calls SpInit(), but doesn't get any farther because it needs more than just the API version number (which is 4)

##Spotify appkey

@ohodoa
ohodoa / md5.go
Created March 25, 2015 06:44
golang md5 file
package main
import (
"crypto/md5"
"os"
"io"
"log"
"encoding/hex"
)
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active April 25, 2025 04:01
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@hamgravy
hamgravy / dropbearonandroid.md
Last active April 6, 2025 19:15
Run an SSH daemon with root console access in Android without rooting

Sometimes you want an Android device on a network. Sometimes that Android device isn't rooted for whatever reason. It's convenient to be able to log into such an Android device's console with root access over the network. Network access can exist over WiFi or Ethernet. There are ssh daemon Android apps out there, but they usually require root. A convenient use-case is logging into your tablet in your backpack under your desk, or on another desk in a remote laboratory.

A great utility for this is dropbear. It's a self-contained binary that implements a stand-alone ssh server with key generation abilities. Once compiled, the binary can be placed on an Android device, will allow the generation of ssh keys and provide root console access over the network.

Get source code and patch it. The patches apply specifically for Android use. Dropbear is obviously suited for most *nix platforms, but Android requires some special modifications.

This is a repository that mirrors the main dropbear repo with the tag that