Skip to content

Instantly share code, notes, and snippets.

View rohansingh's full-sized avatar

Rohan Singh rohansingh

View GitHub Profile
@rohansingh
rohansingh / icons.star
Created August 28, 2023 14:00
Default weather icons for Tidbyt
# Copyright (c) 2023, Tidbyt, Inc.
#
# This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
# https://creativecommons.org/licenses/by-nc/4.0/
THREE_DAY_ICO = {
"cloudy.png": """
iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAIAAAD9iXMrAAAACXBIWXMAAAsTAAAL
EwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj33
3vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEs
@rohansingh
rohansingh / README.md
Created April 5, 2021 13:26
Tidbyt LED matrix pinout

These pinouts are formatted for use with SmartMatrix, but the pin numbers will work for any library.

@rohansingh
rohansingh / gcal.star.py
Created March 24, 2021 16:48
Example of the Google Calendar app for Tidbyt
"""GCal app excerpt
this is an excerpt that rips out the OAuth 2.0 and GCal API calls from
the actual implementation. it's provided as an example of how you could
implement a calendar app against any API.
API call and parsing of the response should go in the `main` function.
the goal is to build an `event` struct that contains a summary, start time,
and end time.
"""
{
"openapi": "3.0.0",
"info": {
"title": "Tidbyt API (http version)",
"description": "",
"version": "0.0.0-autogenerated"
},
"paths": {
"/v1/app-server/render/{deviceID}/{installationID}": {
"post": {
@rohansingh
rohansingh / BUILD.bazel
Last active May 6, 2019 17:53
Tiltfile aspect
tiltfile(
name = "example",
images = {
"//example:image": "example/image",
},
k8s_objects = [
"//example:k8s",
],
template = "Tiltfile.template",
)
@rohansingh
rohansingh / BUILD
Last active March 10, 2021 21:08
Invoking Tilt via Bazel
sh_binary(
name = "tilt",
srcs = ["tilt-wrapper.sh"],
args = ["up"],
data = select({
"@bazel_tools//src/conditions:darwin": ["@tilt_mac_x86_64//:tilt"],
"//conditions:default": ["@tilt_linux_x86_64//:tilt"],
}),
)
@rohansingh
rohansingh / example.bzl
Created December 6, 2018 16:10
Rebuilding native modules for Linux
package_node_modules_cmd = """
mkdir -p "$@"
cp -pRL "external/npm/node_modules" "$(@D)"
"""
rebuild_node_modules_cmd = """
NPM="$$(pwd)/$(location @nodejs//:bin/npm)"
(
cd "$(@D)"
@rohansingh
rohansingh / keybase.md
Created September 30, 2018 21:32
keybase.md

Keybase proof

I hereby claim:

  • I am rohansingh on github.
  • I am rohansingh (https://keybase.io/rohansingh) on keybase.
  • I have a public key ASC33zqpSrBU8uu-Q14CulkgoJO1zho2eb3H9uTIUkUbMwo

To claim this, I am signing this object:

@rohansingh
rohansingh / manifest.json
Last active April 18, 2018 04:16
esp32-idf framework def for platformio
{
"framework-espidf": [
{
"url": "https://github.com/rohansingh/esp-idf/archive/v3.0.0-rc1-pio-1.zip",
"version": "3.0.0-rc1",
"system": "*",
"sha1": "5da85a8f765e50eac0e270d3676b299adbc065a2"
}
]
}
@rohansingh
rohansingh / kubectl.log
Last active January 27, 2016 09:47
Fun with Kube jobs
$ kubectl get job rohan-job-bozus -o yaml
apiVersion: extensions/v1beta1
kind: Job
metadata:
creationTimestamp: 2016-01-26T13:56:04Z
generateName: rohan-job-
labels:
random: blahblahblah
name: rohan-job-bozus
namespace: default