Skip to content

Instantly share code, notes, and snippets.

View vfor4's full-sized avatar
๐Ÿ–

Vfour vfor4

๐Ÿ–
View GitHub Profile
@nhtua
nhtua / 00.install-android-sdk.sh
Last active October 13, 2025 11:44
Run a Headless Android Device on Ubuntu server (no GUI)
#!/bin/bash -i
#using shebang with -i to enable interactive mode (auto load .bashrc)
set -e #stop immediately if any error happens
# Install Open SDK
apt update
apt install openjdk-8-jdk -y
update-java-alternatives --set java-1.8.0-openjdk-amd64
java -version
@wongoo
wongoo / rsautil.go
Created August 1, 2019 03:19
golang RSA utility, include encrypt/decrypt/signature
//author: http://github.com/wongoo
//date: 20190717
package rsautil
import (
"bytes"
"crypto"
"crypto/rand"
"crypto/rsa"
function arrayFrom(a) {
return Array.from(arguments).slice(1);
}
function arraySlice(a) {
return Array.prototype.slice.call(arguments, 1);
}
function argsRest(a, ...args) {
return args;
@eferro
eferro / gist:3265056
Created August 5, 2012 14:15
Python 2.7.3 for old gnu/linux systems (test debian/ubuntu)
# Install minimal development tools
apt-get install build-essential
# Get python from official python ftp
cd /tmp
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar jxvf Python-2.7.3.tar.bz2
cd Python-2.7.3/
# Configure, compile and install python to /opt/py2.7