Skip to content

Instantly share code, notes, and snippets.

View naikrovek's full-sized avatar

Jeremiah Johnson naikrovek

View GitHub Profile
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 July 26, 2016 20:13
Discord Bot a la lurkdis
'use strict';
let Discord = require("discord.js");
let bot = new Discord.Client({
forceFetchUsers: true
});
let botEmail = "";
let botPasswd = "";
<Page
x:Class="BlackBoard.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:BlackBoard"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="White">
@naikrovek
naikrovek / bot.js
Last active April 19, 2016 20:01
very simple lurkdis-like bot for discord.
'use strict';
// set up the Discord client.
let Discord = require("discord.js");
let bot = new Discord.Client({ forceFetchUsers: true });
// this is not an api-compatible bot, so we must log
// in as a regular user. These are those credentials.
let botEmail = "";
let botPasswd = "";
@naikrovek
naikrovek / Default (Windows).sublime-keymap
Last active September 8, 2015 18:58 — forked from jakejscott/Default (Windows).sublime-keymap
Handmade hero Sublime Text 3 settings
[
{ "keys": ["ctrl+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false} },
{ "keys": ["ctrl+down"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true} }
]

Keybase proof

I hereby claim:

  • I am naikrovek on github.
  • I am naikrovek (https://keybase.io/naikrovek) on keybase.
  • I have a public key whose fingerprint is 952D F4B1 0BF8 6B7C 7062 6F98 E519 DCAF D22B 8003

To claim this, I am signing this object:

@naikrovek
naikrovek / preprocessor_fun.h
Last active August 29, 2015 14:27 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@naikrovek
naikrovek / AES128Cipher.java
Last active April 29, 2020 13:21
AES Encryption in Java.
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.AlgorithmParameterSpec;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
// by david @ bees & bombs
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
// by david whyte aka bees and bombs. im sorry for this
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {