Skip to content

Instantly share code, notes, and snippets.

View adrianjoconnor's full-sized avatar

Adrian O'Connor adrianjoconnor

View GitHub Profile
@hacknightly
hacknightly / riffwave.js
Created September 24, 2012 15:20
riffwave.js
/*
* RIFFWAVE.js v0.03 - Audio encoder for HTML5 <audio> elements.
* Copyleft 2011 by Pedro Ladaria <pedro.ladaria at Gmail dot com>
*
* Public Domain
*
* Changelog:
*
* 0.01 - First release
* 0.02 - New faster base64 encoding
@alejandro-isaza
alejandro-isaza / gist:7550829
Created November 19, 2013 19:13
Convert a HttpURLConnection to a cURL command
public static String toCurlRequest(HttpURLConnection connection, byte[] body) {
StringBuilder builder = new StringBuilder("curl -v ");
// Method
builder.append("-X ").append(connection.getRequestMethod()).append(" \\\n ");
// Headers
for (Entry<String, List<String>> entry : connection.getRequestProperties().entrySet()) {
builder.append("-H \"").append(entry.getKey()).append(":");
for (String value : entry.getValue())
@dmandrade
dmandrade / gist:e76a2da8da8a325f3ab9e275da15d5d9
Last active May 2, 2024 23:27
React Native build unsigned apk without development server
# create assets folder in the current project
$ mkdir android/app/src/main/assets
# create bundle script
$ react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
# execute command to run android to create debug apk
$ react-native run-android
# change to android folder