Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Statuses are for social networks, not source control. Fools.

Jeremiah Johnson naikrovek

💭
Statuses are for social networks, not source control. Fools.
  • Moline, IL
View GitHub Profile
View main.go
package main
import (
"bytes"
"database/sql"
"fmt"
"image"
"image/color"
"image/draw"
"image/png"
@naikrovek
naikrovek / SpaceMouse.cpp
Created May 31, 2019
excerpt from SpaceMouse.cpp
View SpaceMouse.cpp
while (hid_read(Device, pOutput, 28) > 0 && ctr < maxreads)
{
drecieved = true;
if (printdebug)
{
dreport += FString::FromHexBlob(pOutput, 28);
}
unsigned char* pCurr = pOutput;
@naikrovek
naikrovek / README.md
Last active Jun 25, 2020
AutoHotKey Scripts for arranging app windows on a UHD monitor.
View README.md

start AutoHotKeyu64.exe wm4k.ahd should launch it. both of the files in this gist should be in the same directory.

with NUMLOCK off, pushing number keys will move windows around. 8 will resize a window to fit 1/8th of your screen (1/4 width, 1/2 height.)

Similar operations for 1, 2, 3, 4, and 6. CTRL does things in combination with 3, 4, and 6, so try those.

Numpad * (with numlock off, always) will arrange a window to occupy 1/12th of the screen (1/6th horizontally and 1/2 vertically).

NEW - Numpad+ and Numpad- will adjust a window's position horizontally

View asdf.cs
public static void ImportFile(string file) {
string filenameWithoutExtension = Path.GetFileNameWithoutExtension(file);
GameObject part = OlImportFile(file);
if (null == part) {
return;
}
part.name = filenameWithoutExtension;
View panelcfg.xml
<?xml version='1.0' encoding='utf-8'?>
<PanelName>ADV7533</PanelName>
<PanelDescription>ADV7533 DSI2HDMI (1920x1080 24bpp)</PanelDescription>
<Group id='EDID Configuration'>
<ManufactureID>0xAF0D</ManufactureID>
<ProductCode>0x0011</ProductCode>
<SerialNumber>0x000000</SerialNumber>
<WeekofManufacture>0x09</WeekofManufacture>
<YearofManufacture>0x13</YearofManufacture>
<EDIDVersion>1</EDIDVersion>
View StartupTask.cs
using System;
using System.Diagnostics;
using System.Linq;
using Windows.Devices.WiFi;
using Windows.Foundation.Diagnostics;
using Windows.ApplicationModel.Background;
using Windows.Networking.Connectivity;
using Windows.Security.Credentials;
using System.Threading.Tasks;
View asset_tracker.ino
#include <AssetTracker.h>
#include "Particle.h"
int transmitMode(String command);
int gpsPublish(String command);
int batteryStatus(String command);
int publishInterval(String command);
// Set whether you want the device to publish data to the internet by default here.
// 1 will Particle.publish AND Serial.print, 0 will just Serial.print
View repro.cpp
This file has been truncated, but you can view the full file.
#include "CppCodeGen.h"
#include "common.h"
namespace System_Private_CoreLib {
namespace System {
class ValueType;
};
};
namespace System_Private_CoreLib {
View file.cs
public sealed partial class MainPage : Page {
CoreDispatcher dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
DiscordSocketClient _client;
string token = "";
public MainPage() {
this.InitializeComponent();
@naikrovek
naikrovek / bot.js
Last active Jul 26, 2016
Discord Bot a la lurkdis
View bot.js
'use strict';
let Discord = require("discord.js");
let bot = new Discord.Client({
forceFetchUsers: true
});
let botEmail = "";
let botPasswd = "";