Skip to content

Instantly share code, notes, and snippets.

View glumb's full-sized avatar
🐿️
Doing

Maximilian Beck glumb

🐿️
Doing
View GitHub Profile
@GpanosXP
GpanosXP / iotaWalletGenAddresses.js
Last active May 24, 2018 16:53
A script that continually clicks the generate new address button until you tell it to stop.
var genAddrId = genAddrId || undefined;
clearInterval(genAddrId);
var btnAddr = document.getElementById("generate-address-btn");
function genNewAddr()
{
if (btnAddr.innerText[2] != "D") return;
btnAddr.click();
setTimeout(function() { btnAddr.click(); }, 1000);
@glumb
glumb / slowServoInit.cpp
Last active April 5, 2017 08:39
Arduino, slowly move the servo to the target orientation from an unknown angle. Delay may be adjusted to match the refresh rate of the servo. Basically it pulses the servo with alternating max and min us until it gets to the target microseconds.
/**
MIT License
Copyright (c) 2017 Maximilian Beck
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
@kittykatattack
kittykatattack / webAudioWrapper
Last active August 29, 2015 14:06
Load and play sounds easily. A lightweight high level wrapper for WebAudio API.
<!doctype html>
<meta charset="utf-8">
<title>Basic WebAudio API sound sprite</title>
<p>Press 1 to play the sound</p>
<script>
//Define the audio context
window.AudioContext = window.AudioContext || window.webkitAudioContext;
@mkottman
mkottman / twoline_prompt.sh
Last active July 19, 2023 06:53
A two-line colored Bash prompt (PS1) with Git branch and a line decoration which adjusts automatically to the width of the terminal. Recognizes SVN, Git and Fossil version control systems and shows the current branch/revision.
# A two-line colored Bash prompt (PS1) with Git branch and a line decoration
# which adjusts automatically to the width of the terminal.
# Recognizes and shows Git, SVN and Fossil branch/revision.
# Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png
# Michal Kottman, 2012
RESET="\[\033[0m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"