Skip to content

Instantly share code, notes, and snippets.

View AlexanderGW's full-sized avatar

Alexander Gailey-White AlexanderGW

View GitHub Profile
@AlexanderGW
AlexanderGW / geth-auto-update.sh
Created August 27, 2022 20:35
Geth (go-ethereum) service auto-update
#!/bin/bash
# Geth auto-update
# Installs and reloads `geth` service, if version is different
# Assumes you have installed and are running a systemd service
# `/etc/systemd/system/geth.service`
#
# [Unit]
# Description=Go Ethereum Client
# After=network.target
@AlexanderGW
AlexanderGW / get-ngrok-session.php
Created October 9, 2020 17:43
Return traffic inspection (session) JSON of current NGROK environment
<?php
/**
* Return JSON traffic inspection (just the session part) of current NGROK (https://ngrok.com/docs) environment
* @author Alexander Gailey-White
*
* Example data:
* {
"Session": {
"Status": 1,
@AlexanderGW
AlexanderGW / fizzbuzz.js
Created May 9, 2020 09:49
FizzBuzz in JS and PHP, using nested ternaries.
// Vanilla
for (var i = 1; i <= 100; i++) {
console.log
((i % 15 === 0) ? 'FizzBuzz' :
((i % 5 === 0) ? 'Buzz' :
((i % 3 === 0) ? 'Fizz' :
i
)
)
);