Skip to content

Instantly share code, notes, and snippets.

View jpoppe's full-sized avatar
💭
🦄 🌴

Jasper Poppe jpoppe

💭
🦄 🌴
View GitHub Profile
@LouCypher
LouCypher / gist:3218906
Last active May 26, 2016 00:20
Use external editor to edit style on Stylish extension
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
@kriegsman
kriegsman / sinelon.ino
Created November 24, 2015 19:22
"sinelon" with no visual gaps at any speed or pixel count
// Updated sinelon (no visual gaps)
void sinelon()
{
// a colored dot sweeping
// back and forth, with
// fading trails
fadeToBlackBy( leds, NUM_LEDS, 20);
int pos = beatsin16(13,0,NUM_LEDS);
static int prevpos = 0;
@tlatsas
tlatsas / arch_kvm_install.md
Last active March 27, 2020 18:26
archlinux kvm guest install cheatsheet
  • partitions
    • use the tool of your choice (fdiks/gdisks/parted)
  • filesystems
    • mkfs -t <fs-type> /dev/<partition>
  • mount partitions on /mnt
  • setup network
    • ip address add <IP>/<CIDR> dev eth0
    • ip route add default via <GW>
    • add dns in /etc/resolve.conf
  • select pacman mirror
@kriegsman
kriegsman / SquareSwirl.ino
Created November 13, 2014 19:21
FastLED 3.1 2-D blur demo on 8x8 matrix
#include <FastLED.h>
#define LED_PIN 6
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
const uint8_t kSquareWidth = 8;
const uint8_t kBorderWidth = 1;
#define NUM_LEDS (kSquareWidth*kSquareWidth)
@ramlaxman
ramlaxman / Ansible Summary.md
Last active December 23, 2020 09:02
Ansible Summary.md

Ansible

It's an automation language, engine and orchestration tool developed by Red hat written in Python using YAML format for writing instructional scripts, affectionately known as "Ansible playbook".

It has an automation engine that runs Ansible playbooks. Cloud provider is present in the ecosystem (AWS, Azure, Google, DigitalOcean, OVH, etc…).

Pros

  • It is an agent-less tools In most scenarios, it use ssh as a transport layer. In some way you can use it as 'bash on steroids'
  • It is very easy to start. If you are familiar with ssh concept - you already know Ansible (ALMOST).
@kriegsman
kriegsman / DiscoStrobeWithPalette.ino
Last active February 8, 2021 14:20
DIscoStrobeWithPalette - *FLASHING* lights in colors that you define using a color palette; default is Halloween colors.
#include "FastLED.h"
// DiscoStrobeWithPalette
// *Flashing* rainbow lights that zoom back and forth to a beat.
// See your doctor before using this code if you have certain neurological conditions.
//
// Same as "DiscoStrobe" (July 2015), except updated to use a
// color palette of your choice instead of the HSV color wheel.
// Default color palette is a section of Purple, Green, Orange,
// and White for Halloween decor.
@romainl
romainl / _rnb.md
Last active August 12, 2021 21:56
RNB, a Vim colorscheme template
@boneskull
boneskull / README.md
Last active November 12, 2021 22:45
MicroPython on ESP32: MQTT and DS18B20 temperature sensor full example
@kriegsman
kriegsman / SoftTwinkles.ino
Last active January 4, 2022 02:44
Soft, warm twinkles. Super short code, super complicated theory of operation.
#include "FastLED.h"
#define LED_PIN 3
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
#define NUM_LEDS 30
CRGB leds[NUM_LEDS];
#define BRIGHTNESS 120
#define DENSITY 80
@mastbaum
mastbaum / custom_directive.py
Created May 10, 2012 20:32
Example of a custom ReST directive in Python docutils
'''Example of a custom ReST directive in Python docutils'''
import docutils.core
from docutils.nodes import TextElement, Inline
from docutils.parsers.rst import Directive, directives
from docutils.writers.html4css1 import Writer, HTMLTranslator
class foo(Inline, TextElement):
'''This node class is a no-op -- just a fun way to define some parameters.
There are lots of base classes to choose from in `docutils.nodes`.