Skip to content

Instantly share code, notes, and snippets.

Avatar
👽

Thomas Schüßler vindolin

👽
  • Germany
View GitHub Profile
View gist:c0c4dc840e799e8c69b6690ce890193f
const IPAddress ip(192, 168, 178, 9);
const IPAddress router(192, 168, 178, 1);
void setup() {
WiFi.persistent(false);
WiFi.mode(WIFI_STA);
WiFi.config(ip, router, router);
WiFi.begin(SSID, PASSWORD);
}
@vindolin
vindolin / ir_babelfish.ino
Last active Nov 16, 2019
Arduino IR Babelfish
View ir_babelfish.ino
// This sketch translates incoming IR codes from a front facing IR receiver to an IR LED on the back of the device.
// I'm using it to controll my Edifier sound system with my Samsung TV remote control.
#include <IRremote.h> // https://github.com/z3t0/Arduino-IRremote
const int RECV_PIN = 4; // attach 1838 IR receiver to this pin
const int LED_PIN = 13; // attach an LED to this pin as a monitor
// the send pin is depending on the timer the library is using, for the nano it's 9
// see: https://github.com/z3t0/Arduino-IRremote/blob/master/boarddefs.h#L67
View code.html
<div class="typeahead-container">
<div class="typeahead-field">
<span class="typeahead-query">
<input id="meinpaket_category" name="meinpaket_category" type="search" placeholder="Meinmaket Kategorie" autocomplete="off" value="Technik &amp; Unterhaltung &gt; Musik &gt; Alternative &gt; Gothic &amp; Wave">
<input id="meinpaket_category_id" name="meinpaket_category_id" type="hidden" value="1.8.1.4">
</span>
</div>
</div>
<script>
@vindolin
vindolin / flashair_watcher.py
Last active Jan 25, 2016
Watch a directory for .x3g files and post them to a flashair sc card.
View flashair_watcher.py
moved to: https://github.com/vindolin/flashair_sync
View column_pack.py
import urwid
class MyEdit(urwid.Edit):
def keypress(self, size, key):
if key == 'enter':
return True
urwid.Edit.keypress(self, size, key)
edit = MyEdit(edit_text='Press ENTER to see my problem!')
View solution.py
#!/usr/bin/env python3
import urwid
palette = [
('highlight', '', '', '', 'bold,#ff0', ''),
('highlight_focus', '', '', '', 'bold,#ff0', '#da0'),
('item_focus','', '', '', '', '#da0'),
]
View substring_highlight.py
#!/usr/bin/env python3
import urwid
palette = [
('highlight', '', '', '', 'bold,#ff0', ''),
('item_focus','', '', '', '', '#da0'),
]
class Item(urwid.WidgetWrap):
View get_total_history.py
#!/usr/bin/env python
# run with get_total_history.py <(history)
import fileinput
history = [
line.strip().partition(' ')[2]
for line in fileinput.input()]
View rotate_over_actors.py
from __future__ import division, print_function
from gi.repository import Clutter
import random
from random import randint
from colorsys import rgb_to_hls, hls_to_rgb
from sys import argv
Clutter.init([])
View attiny85_blinky
#define F_CPU 8000000UL
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <avr/sleep.h>
#include <avr/power.h>
const uint8_t MINPWM = 1;
const uint8_t MAXPWM = 255;
You can’t perform that action at this time.