Skip to content

Instantly share code, notes, and snippets.

View KaiaKitten's full-sized avatar

Kaia Parks KaiaKitten

View GitHub Profile
const int LED=9;
const int BUTTON1=2;
const int BUTTON2=3;
const String CODE = "ABAB";
String rec = "";
String lastRec = "";
boolean lastButton1 = LOW;
boolean currentButton1 = LOW;
@KaiaKitten
KaiaKitten / gist:af128f95b3f298935af6
Created May 26, 2015 22:17
Arduino Photorecptor code
const int RLED = 9;
const int LIGHT = 0;
const int MIN_LIGHT = 200;
const int MAX_LIGHT = 900;
int val = 0;
void setup() {
pinMode(RLED, OUTPUT);
/*
Exploring Arduino - Code Listing 6-6: Arduino Code to send Data to the Computer
http://www.exploringarduino.com/content/ch6
Copyright 2013 Jeremy Blum ( http://www.jeremyblum.com )
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License v3 as published by
the Free Software Foundation.
*/
@KaiaKitten
KaiaKitten / MouseArduino
Last active August 29, 2015 14:24
Arduino Uno Mouse
const int LEFT_BUTTON =2; //Input pin for the left button
const int MIDDLE_BUTTON =3; //Input pin for the middle button
const int RIGHT_BUTTON =4; //Input pin for the right button
const int X_AXIS =0; //Joystick x-axis analog pin
const int Y_AXIS =1; //Joystick y-axis analog pin
int val; //For holding mapped pot value
int readJoystick(int axis)

Keybase proof

I hereby claim:

  • I am kyahco on github.
  • I am kyahco (https://keybase.io/kyahco) on keybase.
  • I have a public key whose fingerprint is 6155 4FDA 9FC6 9B32 E815 C2A3 FD6D 2A2D E4D8 FD5E

To claim this, I am signing this object:

@KaiaKitten
KaiaKitten / Imgur.sh
Last active December 16, 2023 05:43
Uploads files passed it to personal Imgur account. Also auto converts webp and webm files to png and gif.
#!/bin/bash
refresh_token="<insert_refresh_token_here>"
client_id="<insert_client_id_here>"
client_secret="<insert_client_secret_here>"
#Check to make sure any files where passed in.
if [ $# -eq 0 ]; then
echo "No file specified" >&2
exit 16
fi
@KaiaKitten
KaiaKitten / gist:b30673c6a0d84e7e574619b2b2091239
Created November 5, 2016 06:10
Old fizzbuzz test in one line.
public class Main{public static void main(String[] args){for(int i=1;i<=100;i++){System.out.println(i % 3 == 0 & i % 5 == 0 ? "fizzbuzz" : (i % 3 == 0 ? "fizz" : (i % 5 == 0 ? "buzz" : i))); }}}
#!/bin/sh
pactl load-module module-null-sink sink_name=duplex_out sink_properties=device.description="Duplex_out"
pactl load-module module-null-sink sink_name=app_out sink_properties=device.description="App_out"
pactl load-module module-loopback source=app_out.monitor
pactl load-module module-loopback source=app_out.monitor sink=duplex_out
pactl load-module module-loopback source=2 sink=duplex_out