Skip to content

Instantly share code, notes, and snippets.

View brandonaaskov's full-sized avatar

Brandon Aaskov brandonaaskov

  • Mainframe Labs LLC
  • Maine, USA
View GitHub Profile
@theothermattm
theothermattm / docker-compose-cheatsheet.md
Created December 6, 2019 16:02
docker-compose command cheatsheet

build everything in the docker-compose.yaml file

docker-compose build

build just one service in docker-compose.yaml file

docker-compose build myservice

run everything in the docker-compose.yaml file

@rsperl
rsperl / nmap_examples.md
Last active February 16, 2024 02:13
nmap examples #snippet
@benjamincharity
benjamincharity / autonomous.txt
Last active July 17, 2024 20:37
Instructions on how to reset the autonomous desk. This fixes a problem where the desk will not lower (also reportedly fixes incorrectly reported heights).
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these
> steps thoroughly.
Reset Steps:
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds.
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass.
3. Release both buttons.
4. Press the down buttons until the desk beeps one more time or 20 seconds pass.
@darthneel
darthneel / deck_of_cards.json
Created March 10, 2017 20:45
JSON structure for a standard playing card deck
[
{
"suit": "hearts",
"value": 2
},
{
"suit": "hearts",
"value": 3
},
{
@gbaman
gbaman / HowToOTGFast.md
Last active July 19, 2024 23:49
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

@mauvm
mauvm / Jasmine-and-Babel6.md
Created November 12, 2015 10:51
Jasmine ES6 run script for use with Babel 6
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine

.babelrc:

{
 "presets": ["es2015"]
@gaearon
gaearon / slim-redux.js
Last active May 5, 2024 15:14
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@dmiddlecamp
dmiddlecamp / main.ino
Created July 18, 2015 19:54
Photon Audio Example
#define MICROPHONE_PIN A5
#define AUDIO_BUFFER_MAX 8192
int audioStartIdx = 0, audioEndIdx = 0;
uint16_t audioBuffer[AUDIO_BUFFER_MAX];
uint16_t txBuffer[AUDIO_BUFFER_MAX];
// version without timers
unsigned long lastRead = micros();
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@8bitDesigner
8bitDesigner / thing.js
Last active August 29, 2015 13:56
Copy the title and link of every selected TP card
copy($('.tau-selected.tau-card-v2').map(function(i, el) {
return $(el).data('card-data')
}).toArray().sort(function(a, b) {
return (a.type === b.type) ? 0 : a.type > b.type
}).map(function(obj) {
return window.location.origin + '/entity/' + obj.id + ' -- ' + '[' + obj.type + '] ' + obj.name
}))