This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Python library for Adafruit RGB-backlit LCD plate for Raspberry Pi. | |
# Written by Adafruit Industries. MIT license. | |
# This is essentially a complete rewrite, but the calling syntax | |
# and constants are based on code from lrvick and LiquidCrystal. | |
# lrvic - https://github.com/lrvick/raspi-hd44780/blob/master/hd44780.py | |
# LiquidCrystal - https://github.com/arduino/Arduino/blob/master/libraries/LiquidCrystal/LiquidCrystal.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The Sparkfun logo is intellectual property of Sparkfun Inc. | |
The circuit: | |
* LCD RS pin to digital pin 12 | |
* LCD Enable pin to digital pin 11 | |
* LCD D4 pin to digital pin 5 | |
* LCD D5 pin to digital pin 4 | |
* LCD D6 pin to digital pin 3 | |
* LCD D7 pin to digital pin 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int x,y; | |
int direction; | |
int w = 500; | |
int h = 500; | |
int on = (int)color(0,0,0); //black = on | |
int off = (int)color(255,255,255); //white = off | |
void setup() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Jasper install script (http://jasperproject.github.io/) | |
# Must be run as root (i.e. sudo setup.sh) | |
apt-get update | |
apt-get upgrade --yes | |
apt-get install vim git-core espeak python-dev python-pip bison libasound2-dev libportaudio-dev python-pyaudio subversion autoconf libtool automake gfortran --yes | |
sed "s/options snd-usb-audio index=-2/options snd-usb-audio index=0" /etc/modprobe.d/alsa-base.conf>/etc/modprobe.d/alsa-base.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r=Math.random;w=$(window);setInterval("$('<b>★</b>').css({color:'gold',position:'fixed',top:r()*w.height(),left:r()*w.width()}).appendTo('body').animate({fontSize:0},3e3)",9) | |
r=Math.random;w=$(window);setInterval("$('<b>♦</b>').css({color:'blue',position:'fixed',top:r()*w.height(),left:r()*w.width()}).appendTo('body').animate({fontSize:0},3e3)",9) | |
r=Math.random;w=$(window);setInterval("$('<b>★</b>').css({color:'gold',position:'fixed',top:r()*w.height(),left:r()*w.width()}).appendTo('body')",9) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket, errno, time | |
from string import maketrans | |
ircupper = maketrans( | |
"abcdefghijklmnopqrstuvwxyz[]~\\", | |
"ABCDEFGHIJKLMNOPQRSTUVWXYZ{}^|") | |
def parse(cmd): | |
data = cmd.split(" ") | |
if data[0][0] != ':': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
letters = { "a":[ "###", "# #", "###", "# #", "# #"], "b":[ "###", "# #", "###", "# #", "###"], "c":[ "###", "#", "#", "#", "###"], "d":[ "##", "# #", "# #", "# #", "##"], "e":[ "###", "#", "###", "#", "###"], "f":[ "###", "#", "###", "#", "#"], "g":[ "###", "# #", "###", " #", "###"], "h":[ "# #", "# #", "###", "# #", "# #"], "i":[ "###", " #", " #", " #", "###"], "j":[ "###", " #", " #", " #", "##"], "k":[ "# #", "##", "#", "##", "# #"], "l":[ "#", "#", "#", "#", "###"], "m":[ "# #", "###", "###", "# #", "# #"], "n":[ "###", "# #", "# #", "# #", "# #"], "o":[ "###", "# #", "# #", "# #", "###"], "p":[ "###", "# #", "###", "#", "#"], "q":[ "###", "# #", "###", " #", " #"], "r":[ "###", "# #", "##", "# #", "# #"], "s":[ "###", "#", "###", " #", "###"], "t":[ "###", " #", " #", " #", " #"], "u":[ "# #", "# #", "# #", "# #", "###"], "v":[ "# #", "# #", "# #", "# #", " #"], "w":[ "# #", "# #", "# #", "###", "###"], "x":[ "# #", " #", " #", " #", "# #"], "y":[ "# #", "# #", "###", " #", "###"], "z":[ "###", " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket, threading | |
import requests | |
import time, random | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.settimeout(8) | |
sock.bind(("",7593)) | |
sock.listen(10) | |
def handler(con,addr): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SESSION=$USER | |
# requires tmux, speedometer, htop | |
# speedometer = network graphs | |
# htop = better cpu usage | |
# btcwatch.sh and dogewatch.sh simply call ./<coin>-cli getinfo every 30 seconds | |
# leaves a pane open to shell | |
# borrowed some code from http://blog.htbaa.com/news/tmux-scripting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************************* | |
This is an example sketch for our Monochrome Nokia 5110 LCD Displays | |
Pick one up today in the adafruit shop! | |
------> http://www.adafruit.com/products/338 | |
These displays use SPI to communicate, 4 or 5 pins are required to | |
interface | |
Adafruit invests time and resources providing this open source code, |
OlderNewer