Skip to content

Instantly share code, notes, and snippets.

@primetoxinz
primetoxinz / filechat.py
Last active December 31, 2016 22:55
Simple commandline filesystem chat
import os
import argparse
import json
from datetime import datetime
from jose import jwt
parser = argparse.ArgumentParser()
parser.add_argument('--send', '-s',dest='message',nargs=1, help="give a message to write to the file")
parser.add_argument('--listen', '-l',action="store_true", help="listens to changes to the file")
parser.add_argument('--file', '-f',dest='file',nargs=1,default="filechat",help="destination for the send and listen file, defaults to ./filechat")
@primetoxinz
primetoxinz / opencvinstall.sh
Last active September 10, 2017 19:12
Installs OpenCV for Raspberry Pi
sudo apt-get install build-essential git cmake pkg-config ant libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libgtk-3-dev libatlas-base-dev gfortran python2.7-dev python3-dev
DIR=$HOME/vision
mkdir -p $DIR && echo "\n Created Working Directory"
cd $DIR
echo "Downloading OpenCV"
wget -O opencv.zip https://github.com/Itseez/opencv/archive/3.1.0.zip
echo "Unzipping OpenCV"
unzip opencv.zip
echo "Downloading OpenCV_Contrib"
Uncaught TypeError: this.aliveTimer.unref is not a function
at Client.write (/home/tyler/Programming/FRCDashboard/node_modules/wpilib-nt-client/index.js:452)
at aliveTimer.setTimeout (/home/tyler/Programming/FRCDashboard/node_modules/wpilib-nt-client/index.js:451)
ntClient.start((con, err) => {
console.log({con, err});
if (!con)
throw err;
}
);
import time
import random
#pip install pynetworktables
from networktables import NetworkTables
# To see messages from networktables, you must setup logging
import logging
logging.basicConfig(level=logging.DEBUG)
@primetoxinz
primetoxinz / WGD.java
Last active October 27, 2017 23:09
WorldGenDisabler Source
package com.primetoxinz.wgd;
import net.minecraft.world.World;
import net.minecraft.world.chunk.ChunkPrimer;
import net.minecraft.world.gen.MapGenBase;
import net.minecraft.world.gen.structure.*;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Config;
import net.minecraftforge.common.config.ConfigManager;
import net.minecraftforge.event.terraingen.InitMapGenEvent;
@primetoxinz
primetoxinz / idea.log
Created July 29, 2017 00:23
idea.log
2017-07-28 20:19:24,473 [ 0] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
2017-07-28 20:19:24,479 [ 6] INFO - #com.intellij.util.ui.JBUI - User scale factor: 1.0
2017-07-28 20:19:24,479 [ 6] INFO - #com.intellij.util.ui.JBUI - System scale factor: 1.0833334 (IDE-managed HiDPI)
2017-07-28 20:19:24,486 [ 13] INFO - #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IC-172.3317.76, 15 Jul 2017 07:24)
2017-07-28 20:19:24,487 [ 14] INFO - #com.intellij.idea.Main - OS: Linux (4.12.3-1-arch, amd64)
2017-07-28 20:19:24,487 [ 14] INFO - #com.intellij.idea.Main - JRE: 1.8.0_152-release-915-b5 (JetBrains s.r.o)
2017-07-28 20:19:24,487 [ 14] INFO - #com.intellij.idea.Main - JVM: 25.152-b5 (OpenJDK 64-Bit Server VM)
2017-07-28 20:19:24,488 [ 15] INFO - #com.intellij.idea.Main - JVM Args: -Xbootclasspath/a:
# GIMP brightness-contrast tool settings
(time 0)
(brightness -1.000000)
(contrast 0.242718)
# end of brightness-contrast tool settings
#!/bin/bash
case $BLOCK_BUTTON in
1) gsimplecal ;;
esac
date '+%A %Y-%m-%d %H:%M:%S'
{
"main": [{
"type": "header",
"data": {
"background": "#345763",
"color": "#FF00FF",
"title": "TEST"
}
},
{