These pinouts are formatted for use with SmartMatrix, but the pin numbers will work for any library.
This file contains hidden or 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
# Tidbyt Xbox Live App | |
# MIT License | |
# by Nicholas Penree, Dec 19 2021 | |
load("render.star", "render") | |
load("http.star", "http") | |
load("encoding/base64.star", "base64") | |
load("cache.star", "cache") | |
MOCK = False |
This file contains hidden or 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
# Public IP Tidbyt App | |
# MIT License | |
# by Nicholas Penree, Dec 28 2021 | |
load("render.star", "render") | |
load("http.star", "http") | |
load("cache.star", "cache") | |
IPIFY_JSON_URL = "https://api.ipify.org/?format=json" | |
MOCK = False |
This file contains hidden or 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
""" | |
Sign in to Xbox Live with OAUTH2 | |
1. Go to https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade | |
2. Register new app ("+ New registration") | |
2.1. Enter a name for your app | |
2.2. Set "Supported account types" to "Personal Microsoft accounts only" | |
2.3. Click register | |
2.4. Choose "Redirect URIs" -> "Add a Redirect URI" | |
2.5. Click "Add a platform" -> "Mobile and desktop applications" |
This file contains hidden or 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
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
This file contains hidden or 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
// more information here: http://blog.tomtasche.at/2012/10/use-built-in-feedback-mechanism-on.html | |
try { | |
int i = 3 / 0; | |
} catch (Exception e) { | |
ApplicationErrorReport report = new ApplicationErrorReport(); | |
report.packageName = report.processName = getApplication() | |
.getPackageName(); | |
report.time = System.currentTimeMillis(); | |
report.type = ApplicationErrorReport.TYPE_CRASH; |
This file contains hidden or 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
// | |
// chartkick.jade | |
// Copyright(c) 2013 Nicholas Penree <[email protected] | |
// MIT Licensed | |
// | |
mixin pie_chart(data_source, options) | |
+chartkick_cart('PieChart', attributes, data_source, options) | |
mixin area_chart(data_source, options) |
This file contains hidden or 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 java.util.ArrayList; | |
import java.util.List; | |
import android.content.Context; | |
import android.graphics.Typeface; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ArrayAdapter; | |
import android.widget.TextView; |
This file contains hidden or 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 java.io.IOException; | |
import java.io.UnsupportedEncodingException; | |
import java.net.HttpURLConnection; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.HashMap; | |
import com.google.common.base.CharMatcher; | |
import com.google.common.base.Joiner; | |
import com.google.common.base.Splitter; |
This file contains hidden or 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
/* in the test/ folder of a locomotive app that is using jake-lcm */ | |
var mocha = require('mocha') | |
, should = require('should') | |
, lcm = require('jake-lcm') | |
, User; | |
/* Assume there is a model in app/models/user.js with | |
var userSchema = new Schema({ | |
display_name: { type: String, required: true, index: true , trim: true} | |
, email: { type: String, required: true, trim: true} |
NewerOlder