Skip to content

Instantly share code, notes, and snippets.

@badsyntax
badsyntax / index.md
Created September 1, 2014 08:38 — forked from mathisonian/index.md

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

inspiration

My inspiration for building this was Max Ogden's Requirebin, which allows users to use a browser based editor to run custom javascript in the browser (including javascript that had require() statements that would normally need to be pre-processed using browserify).

1. Create a new directory;
mkdir Apple\ Enterprise
cd Apple\ Enterprise
2. Generate a certificate signing request
openssl req -nodes -newkey rsa:2048 -keyout ios_enterprise.key -out CertificateSigningRequest.certSigningRequest
3. With the information like so (ensure you give it a password):
Country Name (2 letter code) [AU]:GB
State or Province Name (full name) [Some-State]:London
@badsyntax
badsyntax / React Native Clear Cache
Created February 5, 2021 18:11 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@badsyntax
badsyntax / s3etag.sh
Last active December 16, 2021 13:47 — forked from emersonf/s3etag.sh
Generate an S3 ETAG for a multipart upload file, on MacOS
#!/bin/bash
# Generate an S3 ETAG for a multipart upload file.
#
# From: https://gist.github.com/emersonf/7413337
# Author: Emerson Farrugia <https://github.com/emersonf>
# Modified by: Richard Willis <https://github.com/badsyntax>
# Modifications: Work with bytes instead of MB.
#
# MacOS only!
@badsyntax
badsyntax / multiple-gource.sh
Created April 8, 2022 08:19 — forked from PhiSYS/multiple-gource.sh
Create multiple repositories visualization video using gource and ffmpeg
#!/usr/bin/bash
declare -a repos=(
"$HOME/Projects/myproject/testing/.git"
"$HOME/Projects/myproject/testing-bundle/.git"
"$HOME/Projects/myproject/service-skeleton/.git"
"$HOME/Projects/myproject/documentation-web/.git"
"$HOME/Projects/myproject/documentation-api/.git"
"$HOME/Projects/myproject/coding-standard/.git"
"$HOME/Projects/myproject/context/microservice1/.git"