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/sh | |
# Max number of concurrent Redis connections before we back off | |
CONN_LIMIT=10000 | |
# Check to make sure all arguments were passed | |
DO_EXIT=0 | |
if [ "$1" == "" ]; then | |
echo "Please provide a list name (in quotes) as first argument." |
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
#include "application.h" | |
#include "pinmap_impl.h" | |
#include "neopixel.h" | |
#define STRIP_LENGTH 121 | |
int PIXEL_PIN = PIN_MAP[D2].gpio_pin; | |
neopixel_strip_t m_strip; | |
uint8_t j; |
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
#include "Adafruit_GFX.h" | |
#include "Adafruit_SSD1306.h" | |
Adafruit_SSD1306 display(D0); | |
static const uint8_t particle[480] = { | |
0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, | |
0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, | |
0B00000000, 0B00000011, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, | |
0B00000000, 0B00000011, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B00000010, 0B00000000, 0B00000000, | |
0B00000000, 0B00000011, 0B00000000, 0B00000000, 0B00001111, 0B11111111, 0B00000000, 0B00000000, 0B00000000, 0B00000000, 0B010 |
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 monitors a Discourse forum for postings by a particular user. | |
* I stopped just shy of figuring out how to publish an event to a | |
* Particle device PubSub stream. | |
**/ | |
var https = require('https'), | |
cp = require('child_process'), | |
xmlParseString = require('xml2js').parseString; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script src="http://benpickles.github.io/peity/jquery.peity.js"></script> | |
<script type="text/javascript"> |
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 | |
for d in $(find www-enabled/ -mindepth 1 -maxdepth 1 -type l); do | |
bn=`basename $d` | |
aliases_arr=($bn) | |
aliases_i=1 | |
# Check if the container is already running | |
is_running=`docker ps -f status=running | grep "$bn" | wc -l` |
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 | |
import pygame, httplib, io | |
from pygame.locals import * | |
from PIL import Image, ImageFont, ImageDraw | |
from time import time, sleep, strftime, localtime | |
# Screen setup | |
print "Press ctrl+c" | |
display = pygame.display |
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
// D0 = Angle Down | |
// D1 = Angle Up | |
// D2 = Left | |
// D3 = Right | |
int pinLeft = D2; | |
int pinRight = D3; | |
int pinDown = D0; | |
int pinUp = D1; |
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
char srvIP[] = "256.256.256.256"; | |
char srvHost[] = "myhost.mydomain.tld"; | |
int srvPort = 80; | |
char srvPath[] = "/?l=test1"; | |
void setup() { | |
delay(5000); | |
pinMode(D7, OUTPUT); |
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
char srvIP[] = "198.199.86.22"; | |
char srvHost[] = "spark.wgb.me"; | |
int srvPort = 80; | |
char srvPath[] = "/logger/?l=uptime-test"; | |
void setup() { | |
delay(5000); | |
pinMode(D7, OUTPUT); |
NewerOlder