Skip to content

Instantly share code, notes, and snippets.

@windix
windix / config.txt
Created May 27, 2024 11:23
RetroPie /boot/config.txt for 10inch 1024x600 screen
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1
@windix
windix / README.md
Last active March 30, 2024 10:23
RP2040-Keyboard.ino
@windix
windix / 1.js
Created December 21, 2021 04:08
Clean up github package by version
const { Octokit } = require('@octokit/rest')
const main = async () => {
const ORG = 'kmartau'
const PACKAGE_PREFIX = 'ko-cdk-'
// if VERSION_TO_CLEAN_UP=13, will delete any version <=13, e.g. '13.0.0', '13.1.1', '1.2.3' etc
const VERSION_TO_CLEAN_UP = 13
const octokit = new Octokit({
auth: 'UPDATE-WITH-PERSONAL-ACCESS-TOKEN'
@windix
windix / forecast.json
Created May 17, 2021 09:47
open weather map
{
"cod": "200",
"message": 0,
"cnt": 4,
"list": [
{
"dt": 1621252800,
"main": {
"temp": 10.7,
"feels_like": 9.81,
### Types
query {
typeDefinitions {
results {
name(locale:"en")
resourceTypeIds
fieldDefinitions {
name
}
@windix
windix / jamf.md
Created July 23, 2019 22:14 — forked from a7ul/jamf.md
removing all restrictions on jamf managed macos device - Provided you have root access.

REMOVE JAMF RESTRICTIONS ON MAC

REMOVE ONLY RESTRICTIONS

sudo jamf removeMDMProfile removes all restrictions

sudo jamf manage brings back all restrictions and profiles

REMOVE ALL RESTRICTIONS AND DISABLE JAMF BINARIES WHILE KEEPING YOUR ACCESS TO VPN AND OTHER SERVICES

sudo jamf removeMDMProfile removes all restrictions

@windix
windix / ecs.sh
Created July 20, 2019 04:21
Bash script to get ec2 instance-id from ecs service
#!/usr/bin/env bash
ENV=dev
AWS_PROFILE=${ENV}
CLUSTER=${ENV}-cluster
if [[ -z $1 ]]; then
echo "USAGE: $0 service-keyword"
exit 1
@windix
windix / bakeACake.js
Created August 19, 2018 11:42 — forked from jh3y/bakeACake.js
Baking a cake with async + await
// helper function for stock check
const doTheyHaveIt = () => Math.random() > 0.1
// boilerplate functions for getting the different ingredients
const getButter = () => new Promise((resolve, reject) => {
setTimeout(doTheyHaveIt() ? resolve('Butter') : reject('Sorry, no butter'), 1000)
})
const getFlour = () => new Promise((resolve, reject) => {
setTimeout(doTheyHaveIt() ? resolve('Flour') : reject('Sorry, no flour'), 1000)
})
@windix
windix / brew-perms.sh
Last active June 15, 2018 04:51 — forked from jaibeee/brew-perms.sh
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
sudo chgrp -R admin /usr/local/*
sudo chmod -R g+w /usr/local/*
#include <Wire.h> // This library allows you to communicate with I2C
#include <Adafruit_GFX.h> // Adafruit GFX graphics core library
#include <Adafruit_SSD1306.h> // Driver library for 'monochrome' 128x64 and 128x32 OLEDs
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");