Skip to content

Instantly share code, notes, and snippets.

View sterlingwes's full-sized avatar
🍉

Wes Johnson sterlingwes

🍉
View GitHub Profile
@tolpp
tolpp / android-send-push-locally-using-adb.adoc
Last active April 4, 2024 16:33
This gist explains how to send push notification locally using ADB without need network connection.

Requirements:

  • Device should be a rooted (simulator’s are rooted by default)

  • adbd should be started as root. (Rub command: adb root )

Now, send local push message using command:

@pixelomer
pixelomer / mkjail.sh
Last active October 13, 2023 15:39
Create a macOS chroot jail with GNU bash and utilities
#!/usr/bin/env sh
#############################################
# WARNING #
# No more commits are going to be made to #
# this gist. Please get the latest script #
# from the new repository: #
# https://github.com/pixelomer/macos-mkjail #
#############################################
@trinnguyen
trinnguyen / config.yml
Last active October 19, 2018 14:58
CircleCI 2.0 Android config with Keystore Signing
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-25-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 25, 2024 03:58 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@schickling
schickling / _README.md
Last active January 4, 2024 09:37
Script to import and export docker-machine configurations to sync between hosts/collaborators

docker-machine import/export

Script to import and export docker-machine configurations to sync between hosts/collaborators

Export (on host A)

$ docker-machine ls
NAME       ACTIVE   DRIVER         STATE     URL                            SWARM   DOCKER    ERRORS
dev        -        digitalocean   Running   tcp://example.com:2376                 v1.10.1
@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active April 19, 2024 18:20
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."git@github.com:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@jmindek
jmindek / gist:62c50dd766556b7b16d6
Last active January 31, 2024 15:48
DISTINCT ON like functionality for Redshift

distinct column -> For each row returned, return only the unique members of a set. Think of it as for each row in a projection, concatenate all the column values and return only the strings that are unique.

test_db=# SELECT DISTINCT parent_id, child_id, id FROM test.foo_table ORDER BY parent_id, child_id, id LIMIT 10;
parent_id | child_id | id
-----------+------------+-----------------------------
1000040 | 103 | 1000040|2645405726|0001|103
@ftiasch
ftiasch / server.py
Created August 13, 2015 09:52
python SimpleHTTPServer with custom MIME types
import SimpleHTTPServer
import SocketServer
PORT = 8000
class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
pass
Handler.extensions_map['.shtml'] = 'text/html'
@willrstern
willrstern / node-ubuntu-upstart-service.md
Last active August 17, 2023 10:15
Run Node.js App as Ubuntu Upstart Service

###The Issue With Forever Forever is great for running node services, with a minor setback: the word "forever" doesn't apply to system reboots.

###The solution, run node apps as a system service logged in as root

vim /etc/init/node-app.conf

Contents for node-app.conf