Skip to content

Instantly share code, notes, and snippets.

View chetbox's full-sized avatar
🤖
Making da codez

Chetan Padia chetbox

🤖
Making da codez
View GitHub Profile
POST https://firestore.googleapis.com/v1beta1/projects/firestore-fun/databases/(default)/documents:commit?key={YOUR_API_KEY}
{
"writes": [
{
"update": {
"name": "projects/firestore-fun/databases/(default)/documents/foo/bar",
"fields": {
"some-field": {
"stringValue": "some-value"
@plembo
plembo / RPIwithQEMU.md
Last active May 16, 2024 08:38
Emulating a Raspberry Pi with QEMU

Emulating a Raspberry Pi with QEMU

Goal: Emulate a Raspberry Pi with QEMU in order to run the Raspbian O/S (based on Debian Linux).

The current setup is not ideal. For one thing, the maximum RAM allowed using the "versatile-pb" firmware is 256 Mb. In addition, only the most basic peripherals, a keyboard and mouse, are supported.

A number of articles have been written on this topic. Most are outdated, and the few recent ones are missing key information.

@JakeSidSmith
JakeSidSmith / brighton-and-hove-meetups.md
Last active March 29, 2018 16:36
List of Brighton & Hove Design, Development, and Various Other Tech / Nerdy Meetups

ANNOUNCEMENT: We've moved all of these meetups to a better maintained website called Brighton Brains - add it to your bookmarks, share it on your social media, etc. :D

Brighton & Hove Design, Development, and Related Meetups

Development

A JavaScript meetup for Brighton & Hove

@joyrexus
joyrexus / README.md
Last active August 21, 2023 16:59
Node.js streams demystified

A quick overview of the node.js streams interface with basic examples.

This is based on @brycebaril's presentation, Node.js Streams2 Demystified

Overview

Streams are a first-class construct in Node.js for handling data.

Think of them as as lazy evaluation applied to data.

@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
ACTION
AD_HOC_CODE_SIGNING_ALLOWED
ALTERNATE_GROUP
ALTERNATE_MODE
ALTERNATE_OWNER
ALWAYS_SEARCH_USER_PATHS
ALWAYS_USE_SEPARATE_HEADERMAPS
APPLE_INTERNAL_DEVELOPER_DIR
APPLE_INTERNAL_DIR
APPLE_INTERNAL_DOCUMENTATION_DIR
@JakeWharton
JakeWharton / dex.sh
Last active March 25, 2024 13:54
`classes.dex` method count helpers. Requires smali/baksmali from https://code.google.com/p/smali/ and dexdump from the build-tools in the Android SDK be on your PATH.
function dex-method-count() {
cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'
}
function dex-method-count-by-package() {
dir=$(mktemp -d -t dex)
baksmali $1 -o $dir
for pkg in `find $dir/* -type d`; do
smali $pkg -o $pkg/classes.dex
count=$(dex-method-count $pkg/classes.dex)
name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.')
@kikairoya
kikairoya / _etc_profile.d_systemd.sh
Created June 24, 2013 14:01
Enables 'systemctl --user' without X11, dbus-launch, systemd-user-session
if [ ! -S /run/user/$(id -u)/dbus/user_bus_socket ]; then
mkdir -p /run/user/$(id -u)/dbus
dbus-daemon --session --fork --address=unix:path=/run/user/$(id -u)/dbus/user_bus_socket --systemd-activation
fi
if ! systemctl --user > /dev/null 2> /dev/null; then
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/dbus/user_bus_socket /usr/lib/systemd/systemd --user & > /dev/null 2> /dev/null
fi
@JakeWharton
JakeWharton / OkConnectionFactory.java
Created June 17, 2013 15:04
A connection factory for using OkHttp with Kevin Sawicki's HttpRequest library.
/**
* A {@link HttpRequest.ConnectionFactory connection factory} which uses OkHttp.
* <p/>
* Call {@link HttpRequest#setConnectionFactory(HttpRequest.ConnectionFactory)} with an instance of
* this class to enable.
*/
public class OkConnectionFactory implements HttpRequest.ConnectionFactory {
private final OkHttpClient client;
public OkConnectionFactory() {