Skip to content

Instantly share code, notes, and snippets.


Lamp ledlamp

Block or report user

Report or block ledlamp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ledlamp / wrapper.js
Created May 28, 2019
JPLand Minecraft 1.14.x server wrapper
View wrapper.js
var child_process = require("child_process");
var Discord = require("discord.js");
var discordBot = new Discord.Client();
discordBot.on("error", console.error);
discordBot.login(process.cwd().includes("creative") ? "" : "");
discordBot.on("ready", () => {
discordBot.user.setActivity(process.cwd().includes("creative") ? "" : process.cwd().includes("survival") ? "" : undefined);
ledlamp / untitled.js
Last active May 16, 2019
Copy of Brandon(?!)'s fishing bot from Aug 5, 2016:
View untitled.js
var Client = require("../multiplayerpiano/static/Client.js");
var levelup = require("levelup");
var fs = require("fs");
var crypto = require("crypto");
var fish = ["Angelfish", "Arapaima", "Arowana", "Barbel Steed", "Barred Knifejaw", "Bitterling", "Black Bass", "Blowfish", "Blue Marlin", "Bluegill", "Brook Trout", "Butterflyfish", "Can", "Carp", "Catfish", "Char", "Cherry Salmon", "Clownfish", "Coelacanth", "Crawfish", "Crucian Carp", "Dab", "Dace", "Dorado", "Eel", "Football fish", "Freshwater Goby", "Frog", "Gar", "Giant Snakehead", "Giant Trevally", "Goldfish", "Guppy", "Hammerhead Shark", "Horse Mackerel", "Jellyfish", "Key", "Killifish", "King Salmon", "Koi", "Large Bass", "Loach", "Lobster", "Mitten Crab", "Moray Eel", "Napoleonfish", "Neon Tetra", "Nibble Fish", "Oarfish", "Ocean Sunfish", "Octopus", "Olive Flounder", "Pale Chub", "Pike", "Piranha", "Pond Smelt", "Popeyed Goldfish", "Puffer Fish", "Rainbow Trout", "Ray", "Red Snapper", "Ribbon Eel", "Saddled Bichir", "Salmon", "Saw Shark", "Sea Bas
ledlamp / index.js
Last active Aug 22, 2019 data collector
View index.js
var fs = require("fs");
fs.appendFileSync("", "\n\n\n");
var Discord = require("");
var client = new Discord.Client({
token: require("../config").token,
autorun: true,
messageCacheLimit: 0
client.setPresence({status: "invisible"});
ledlamp /
Last active May 19, 2019
Count seconds spent in each app each day and write to file
from AppKit import NSWorkspace
import time
from datetime import datetime
date = str(
apptimes = {}
while True:
app = NSWorkspace.sharedWorkspace().activeApplication()['NSApplicationName']
ledlamp /
Created May 7, 2019
Mac Python script to count seconds spent per app
from AppKit import NSWorkspace
import threading
def setInterval(func,time):
e = threading.Event()
while not e.wait(time):
apptimes = {}
ledlamp / index.js
Last active Mar 23, 2019
Node.js process wrapper
View index.js
var child_process = require("child_process");
var exampleProcess = child_process.spawn("java", ["-jar", "server.jar"]);
exampleProcess.stdout.pipe(process.stdout); // pipe child process output to parent stdout so you get console output as normal
exampleProcess.stdout.on('data', (data) => {
require("fs").appendFileSync("output.txt", data); // programatically do something with the output
exampleProcess.stderr.pipe(process.stderr); // ditto for standard error
ledlamp / install-pkg
Created Mar 18, 2019
/usr/bin/install-pkg from "ploygott" 🤔
View install-pkg
#!/usr/bin/env bash
# bin/compile <build-dir> <cache-dir>
# fail fast
set -e
# debug
# set -x
# parse and derive params
ledlamp / .js
Last active Feb 10, 2019
draw image on
View .js
function getRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
return color;
function drawPixel(x, y, color) {
View asd.js
let pks = `a1
View reverse-ws-proxy.js
var http = require('http');
var httpProxy = require('http-proxy');
var express = require('express');
var app = express();
var proxy = httpProxy.createProxyServer();
var server = require('http').createServer(app);
app.get('/', function(req, res) {
try {
You can’t perform that action at this time.