Skip to content

Instantly share code, notes, and snippets.

View gbraad's full-sized avatar
👨‍👩‍👦‍👦
Working from home

Gerard Braad gbraad

👨‍👩‍👦‍👦
Working from home
View GitHub Profile
@praveenkumar
praveenkumar / minishift_Virtualbox.sh
Last active December 31, 2018 07:42
Minishift with Virtualbox
#!/bin/bash
set +x
prerequisites()
{
# Check if VirtualBox is installed
if [[ $(vboxmanage --version | head -c1 | wc -c) -eq 0 ]]; then
echo "Virtualbox is not installed on this system"
exit 1
@praveenkumar
praveenkumar / installerDump
Created October 18, 2018 10:42
Openshift Installer dump
Resources
---------
bootstrap: 16GB HDD/2 CPUS/2GB Memory
master: 16GB HDD/2 CPUS/3GB Memory
test1-worker: unknown HDD/2 CPUS/2GB Memory
Time-Taken (on office-network)
------------------------------
@@ -46,10 +46,18 @@ func StartProxy(proxyPort int, proxyUpstreamAddr string) {
// set custom CA
setCA(minishiftTLS.CACert, minishiftTLS.CAKey)
+ f, err := goos.OpenFile("/tmp/proxy_access.log", goos.O_APPEND|goos.O_CREATE|goos.O_WRONLY, 0644)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ logger := log.New(f, "proxy", log.Lshortfile)
https://youtu.be/-C-JoyNuQJs?t=39m45s
When I put the reference implementation onto the website I needed to
put a software license on it.
And I looked at all the licenses that were available, and there were a lot
of them. And I decided that the one I liked the best was the MIT License,
which was a notice that you would put on your source and it would say,
"you're allowed to use this for any purpose you want, just leave the
notice in the source and don't sue me."
@darrylsloan
darrylsloan / music_sequencer.py
Last active October 14, 2020 00:56
Music sequencer for the BBC micro:bit
# MUSIC SEQUENCER by Darryl Sloan (30/11/2017)
# Step 1: press A to toggle the first note of the desired scale, then B to select.
# Step 2: press A to toggle the time signature (3/4, 4/4 or 5/4), then B to select.
# Step 3: press A to toggle the desired number of patterns (1 to 4), then B to select.
# Press A to move the range of notes selected. Press B to randomise the selected notes.
# The direction of tilt determines which scale the random notes conform to:
# Left = minor; right = major; forward = minor pentatonic; backward = major pentatonic.
# While holding A during the first note of the sequence, tilting up/down increases/decreases the tempo,
# tilting left/right selects a lower/higher octave.
@gpchelkin
gpchelkin / dante_setup.sh
Last active August 22, 2023 06:45
How to Setup SOCKS5 Proxy Server for (not only) Telegram using Dante on Ubuntu 16.04 / 18.04 / 20.04
### NOT A SCRIPT, JUST A REFERENCE!
# install dante-server
sudo apt update
sudo apt install dante-server
# or download latest dante-server deb for Ubuntu, works for 16.04 / 18.04 / 20.04:
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/dante/dante-server_1.4.2+dfsg-7build5_amd64.deb
# or older version:
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb
@gbraad
gbraad / README.md
Last active May 23, 2024 18:27
Buy Me a Coffee

Buy Me a Coffee

Using inlined HTML

Buy Me A Coffee

<a href="https://www.buymeacoffee.com/gbraad" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
@gbraad
gbraad / README.md
Last active January 4, 2019 16:28
Running a multi-stage build on Fedora

Running a multi-stage build on Fedora

Running a multi-stage build on Fedora is possible without 'installing' Docker CE

FROM fedora:27 AS base
FROM base AS test
@dvsseed
dvsseed / main.cpp
Created January 4, 2018 07:07
DS3231 RTC Demo Code on Mbed micro:bit platform
/*
The MIT License (MIT)
Copyright (c) 2016 British Broadcasting Corporation.
This software is provided by Lancaster University by arrangement with the BBC.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
@peterholak
peterholak / AutoScrollingTextarea.tsx
Last active June 3, 2022 09:04
React textarea component that scrolls to the bottom whenever its content changes
/*
Copyright 2017 Peter Holak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT