Skip to content

Instantly share code, notes, and snippets.

View danielmelogpi's full-sized avatar
🔬

Daniel Melo danielmelogpi

🔬
View GitHub Profile
@cowboy
cowboy / 1-file.txt
Last active May 6, 2024 12:29
Iterate over all lines in a file, handing extra trailing newlines
foo bar
baz
qux
last line (there may or may not be a trailing newline after this line)
@modeswitch
modeswitch / gist:114c9bd55d800df242a2
Last active June 19, 2020 17:16
Building Node.js for Anddoid

Before you begin

Make sure you have adb installed and that it works. Test this by connecting your phone and running adb devices. In order to proceed past the build stage, your device must be rooted. The device I used is running Cyanogenmod with root enabled for both apps and adb.

Build

Fetch the Android NDK

You'll need to get the Android NDK. I used r8e, which you can get from here: http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86.tar.bz2. Make sure you get the x86 version, as the x86_64 version will not help you. Let's call the path where you unpack this NDK_PATH.

a=$(curl -s ipogre.com/linux.php); a=${a##* }; echo ${a%%<*}