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
Region | Name Prefix | API Endpoint | |
---|---|---|---|
US South/Dallas/us-south | bmix-dal | https://composebroker-dashboard-public.mybluemix.net | |
United Kingdom/London/eu-gb | bmix-lon | https://composebroker-dashboard-public.eu-gb.mybluemix.net | |
Germany/eu-de | bmix-eude | ttps://composebroker-dashboard-public.eu-de.mybluemix.net | |
Sydney/au-syd | bmix-syd | https://composebroker-dashboard-public.au-syd.mybluemix.net |
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 | |
if [ $# -eq 0 ] | |
then | |
echo "No directory given to gogogadget!" | |
exit | |
fi | |
EDITDIR=$1 | |
echo "Gogogadgeting files in $EDITDIR" | |
echo "Adding dtoverlay to $EDITDIR/config.txt" | |
echo "dtoverlay=dwc2" >>$EDITDIR/config.txt |
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
from gpiozero import LEDBoard | |
from time import sleep | |
from signal import pause | |
treelights=[ 18, 5, 9, 11, 21, 10, 7, 12, 6, 1,14, 3, 20, 24, 13, 15,2, 17, 16, 23,8, 22, 4, 19 ] | |
treemap={ 1:4, 7:5, 16:6, 22:7, 6:8 , 14:9, 8:10, 21:11, 15:12, 3:13, 19:14, 2:15, 9:16, 10:17, 20:18, 18:19,17:20, 4:21, 24:22, 23:23, 13: | |
24, 5:25, 12:26, 11:27 | |
} | |
leds=LEDBoard(*range(4,28), pwm=True) |
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
"use strict"; | |
/* jshint node:true */ | |
// Add the express web framework | |
const express = require("express"); | |
const app = express(); | |
const { URL } = require("url"); | |
// Use body-parser to handle the PUT data | |
const bodyParser = require("body-parser"); |
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
/*************************************************** | |
Fireworks - A simple touch fireworks demo | |
Based on code written by Limor Fried/Ladyada for Adafruit Industries. | |
MIT license, all text above must be included in any redistribution | |
****************************************************/ | |
#include <SPI.h> | |
#include "Adafruit_GFX.h" |
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 <M5Stack.h> | |
#include "FastLED.h" | |
#define Neopixel_PIN 21 | |
#define NUM_LEDS 37 | |
CRGB leds[NUM_LEDS]; | |
uint8_t gHue = 0; | |
uint8_t pixel = 18; |
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
using MongoDB.Bson; | |
using MongoDB.Bson.Serialization.Attributes; | |
using MongoDB.Driver; | |
using System; | |
using System.Threading.Tasks; | |
namespace MongoDBTransaction | |
{ | |
public static class Program | |
{ |
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 time | |
import board | |
import pulseio | |
ledr = pulseio.PWMOut(board.LED_R, frequency=5000, duty_cycle=0) | |
ledg = pulseio.PWMOut(board.LED_G, frequency=5000, duty_cycle=0) | |
ledb = pulseio.PWMOut(board.LED_B, frequency=5000, duty_cycle=0) | |
leds=[ ledr, ledg, ledb ] | |
while True: |
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
from adafruit_clue import clue | |
import board | |
from analogio import AnalogIn | |
clue.sea_level_pressure = 1020 | |
ap0=AnalogIn(board.P0) | |
ap1=AnalogIn(board.P1) | |
ap2=AnalogIn(board.P2) | |
clue_data = clue.simple_text_display(title="CLUE Sensor Data!", title_scale=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
#!/bin/bash | |
regex='^app = "([^"]*)"' | |
while read line | |
do | |
if [[ $line =~ $regex ]] | |
then | |
appname="${BASH_REMATCH[1]}" | |
flyctl destroy $appname -y | |
exit |