Skip to content

Instantly share code, notes, and snippets.

View NoahRoseLedesma's full-sized avatar

Noah Rose Ledesma NoahRoseLedesma

View GitHub Profile
@NoahRoseLedesma
NoahRoseLedesma / Menu_DevGame.cs
Created February 7, 2024 06:04
Auto Improvement Mod for Mad Games Tycoon 2
// Add the following line to the end of `public void BUTTON_Start()` in `Menu_DevGame`
ModUtilities.StartAllImprovements(this.guiMain_, taskGame.gameID);
-- When running this code in LOVE, the player's top left corner dot and square will follow the top left corner of the white square
-- When running this code on hardware with LovePotion for switch, the dot will not follow the top left corner of the white square, but the square will
camera = {}
camera._x = 0
camera._y = 0
function camera:set()
love.graphics.push()
love.graphics.translate(-self._x, -self._y)
@NoahRoseLedesma
NoahRoseLedesma / twitterbot.js
Last active June 5, 2016 03:53
Node module that wraps the functionality of 'Twitter' NPM module.
// Require Twitter module
const twitter = require('twitter');
// Define list of triggers, username, last tweet, and interval object :
triggers = [];
username = "";
interval = null;
lastTweet = "";
// Constructor
@NoahRoseLedesma
NoahRoseLedesma / musicPlayer.js
Created March 3, 2016 19:58
Script to play music files generated through midiConvert.js
if(process.argv[2] == undefined)
{
console.log("No song specified");
}
var songName = process.argv[2];
var fs = require('fs');
// Load song
var mySong = [];
try {
mySong = JSON.parse(fs.readFileSync(songName));
@NoahRoseLedesma
NoahRoseLedesma / midiConvert.js
Created March 3, 2016 19:57
Program to convert Midi files into an array of frequencies.
var midiFileParser = require('midi-file-parser');
var MIDIUtils = require('midiutils');
var song = "hotline_bling"
var file = require('fs').readFileSync(song + '.mid', 'binary')
var midi = midiFileParser(file);
notes = [];
noteStatus = false;
@echo off
if exist notice.vbs (
rem file exists
) else (
(
echo Set objArgs = WScript.Arguments
echo messageText = objArgs^(0^)
echo MsgBox messageText
) >notice.vbs
)
@NoahRoseLedesma
NoahRoseLedesma / NoahTestOpMode.java
Created October 3, 2015 22:32
FTC app opmode to move a single motor using remote input
package com.qualcomm.ftcrobotcontroller.opmodes;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorController;
import com.qualcomm.robotcore.util.ElapsedTime;
import com.qualcomm.robotcore.util.Range;
import java.text.SimpleDateFormat;
import java.util.Date;
// server.js
//Run with: node PORT=8081 server.js
//Run with ports below 1024 with sudo: node PORT=80 server.js
// BASE SETUP
// ==============================================
var express = require('express');
var app = express();