Skip to content

Instantly share code, notes, and snippets.

View madmod's full-sized avatar

John Wells madmod

  • @-stealth-mode-
View GitHub Profile
@vsetka
vsetka / multipart-streaming-s3-upload.js
Created October 19, 2017 11:58
Demonstrates how a file can be read as a stream (from network), piped through gzip and into an s3 bucket without having to store it locally our load it whole in memory
const { Writable, Readable, PassThrough } = require("stream");
const { inherits } = require("util");
const AWS = require("aws-sdk");
const zlib = require("zlib");
const https = require("https");
const gzip = zlib.createGzip();
const s3 = new AWS.S3();
// Change the bucket name to point to an S3 bucket write-able within the IAM role assigned to your Lambda
# this is a bag of functions sourced by another script
if [[ $BASH_VERSINFO -lt "4" ]]; then
echo "!! Your system Bash is out of date: $BASH_VERSION"
echo "!! Please upgrade to Bash 4 or greater."
exit 2
fi
if [[ $EUID -ne 0 ]]; then
echo "!! This script must be run as root"
@Pulimet
Pulimet / AdbCommands
Last active May 1, 2026 23:20
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@tuliomonteazul
tuliomonteazul / traefik-kubernetes-config.md
Last active March 25, 2021 07:01
Traefik configuration for Kubernetes using Helm

deployment.yaml

{{- range .Values.envs }}
{{ $version := index $.Values.traefikAPI .name "version" }}
{{ $replicas := index $.Values.traefikAPI .name "replicas" }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: traefik-api-ingress-controller
@lovesunstar
lovesunstar / wk.bridge.js
Last active February 3, 2022 00:53
Provide a way to send event to native.
/* wk.bridge.min.js | v0.2 */
(function() {
if (window.isIOS) {
return
}
window.isIOS = function () {
return navigator && navigator.userAgent && (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent))
}
}());
/* wk.bridge.min.js | v0.3 */
@tomogoma
tomogoma / ImageRotator.java
Created March 18, 2017 08:25
Android code to rotate an image based on exif information
// imports
public class ImageRotator {
public static Bitmap rotateImage(String path) throws IOException {
Bitmap bitmap = BitmapFactory.decodeFile(path);
return rotateImage(bitmap);
}
public static Bitmap rotateImage(Bitmap bitmap) throws IOException {
int rotate = 0;
@dvdfreitag
dvdfreitag / RemoveWin10Apps.ps1
Created January 30, 2017 16:36
Remove all Windows 10 Store apps
<# This will attempt to remove all installed packages.
# Note: This will spit out a larage number of exception messages, this is due to unremovable apps, such as Cortana.
#>
foreach ($package in Get-AppxPackage -AllUsers) { Remove-AppxPackage $package.PackageFullName }
@fishi0x01
fishi0x01 / baseURL.groovy
Last active February 3, 2025 16:37
This is a collection of groovy scripts I gathered and use for bootstrapping Jenkins. Most of this can also be achieved with the CasC Plugin https://github.com/jenkinsci/configuration-as-code-plugin
#!groovy
/*
* This script configures the Jenkins base URL.
*/
import jenkins.model.JenkinsLocationConfiguration
JenkinsLocationConfiguration location = Jenkins.instance.getExtensionList('jenkins.model.JenkinsLocationConfiguration')[0]
location.url = 'https://jenkins-as-code-poc.devtail.io/'
@mdo
mdo / 00-intro.md
Last active April 17, 2026 15:37
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

@mikesplain
mikesplain / Jenkinsfile
Created December 19, 2016 16:49
Jenkins kubernetes dind
podTemplate(label: 'mypod', containers: [
containerTemplate(name: 'docker', image: 'docker:dind', ttyEnabled: true, alwaysPullImage: true, privileged: true,
command: 'dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay')
],
volumes: [emptyDirVolume(memory: false, mountPath: '/var/lib/docker')]) {
node ('mypod') {
stage 'Run a docker thing'
container('docker') {
stage 'Docker thing1'