Skip to content

Instantly share code, notes, and snippets.

View jonesnxt's full-sized avatar

Kelsey jonesnxt

  • Subsecond
  • San Diego, CA
View GitHub Profile
@jonesnxt
jonesnxt / rs.c
Created July 3, 2015 02:48
Convert to and from RS addresses in C
/*
NXT address converter,
Ported from original javascript (nxtchg)
To C by Jones
*/
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
<!DOCTYPE html>
<html>
<head>
<style>
</style>
</head>
<body>

Template Creation Process

  1. Find some source files to paste in. In this tutorial I'm going to use The Coding Train's P5 flappy bird clone: https://github.com/CodingTrain/website/tree/master/CodingChallenges/CC_041_ClappyBird/P5
  2. Go to gokoji.com and make an account if you don't already have one and go to templates and create a project from the Koji P5 Scaffold Template.
  3. We now have a base Koji project, let's start copying over our repo. The first place that we're gonna do that is in index.html we need a couple p5 libraries. frontend/common/index.html in your <head>tag put the following:
<script  language="javascript"  type="text/javascript"  src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.min.js"></script>
<script  language="javascript"  src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/addons/p5.dom.min.js"></script>

Anatomy of a Koji Project

This is a list of where every file that is important to Koji lives and a description of what those files do. This is the recommended structure for Koji projects, deviations from this file organization are fine, but they should have a good reason.

The only truly required files for Koji to work are in the first two sections, README.md, develop.json, and deploy.json. After those files this document just describes best practices and what to expect in the Scaffolds and Templates that currently exist in Koji.

./README.md

This file is in your root directory and renders a markdown file for the Overview tab in the Project section on the left hand side.

The .koji directory

How do I make a folder?

Right now the easiest way to make a folder is to use the plus button in the left side file menu in a project to bring up the new file prompt. If a file is added into a directory that does not yet exist, Koji will create that directory. Create a new directory from file prompt

function setup() {
createCanvas(window.innerWidth, window.innerHeight, WEBGL);
perspective();
}
function preload() {
img = loadImage('https://i.imgur.com/vJgD8sl.jpg');
}
const midX = window.innerWidth/2;
@jonesnxt
jonesnxt / google-chat-styling.md
Created March 10, 2021 02:44
A very quickly hacked together re-styling of Google Chat

Jones Mode - Google Chat Restyle

To enable:

  1. Right click google meet and click "Inspect"
  2. Go to the "Console" tab
  3. Paste the script featured below into the console
  4. Ignore the message telling you not to do this
  5. Hit enter and it should work until next time you open the app

e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(".WQKmIb .Bl2pUd{background-color:#deeffe;padding-bottom:20px}.XbbXmb.zzVqCe+.ajCeRb:not(.zzVqCe),.WQKmIb .ajCeRb:not(.zzVqCe){border-radius:20px;border-bottom-left-radius:4px;margin-top:16px;background-color:#FFF;padding-bottom:4px;}.zzVqCe,.XbbXmb.zzVqCe{border-radius:20px;border-bottom-left-radius:4px;border-top-left-radius:4px;border-top:1px solid #eee;background-color:#FFF;padding-top:8px;padding-bottom:4px;}.YQsadf{width:42px;height:42px;border-radius:100%;}.cmEq8b .Z4BnXb .njhDLd{font-size:1.2rem}.Zc1Emd{font-size:1rem;line-height:1.6rem}.HmJAwd{width:42px;}")),document.head.appendChild(e);

@jonesnxt
jonesnxt / google-chat-replies.md
Last active March 11, 2021 02:54
Add a reply button to messages on google chat

Google Chat Replies

To enable:

  1. Right click google meet and click "Inspect"
  2. Go to the "Console" tab
  3. Paste the script featured below into the console
  4. Ignore the message telling you not to do this
  5. Hit enter and it should work until next time you open the app
Array.from(document.styleSheets)
.filter((sheet) => {
try {
sheet.cssRules;
return true;
} catch (err) {
console.log(
`Due to CORS issues, this script can't access "${sheet.href}"`
);
return false;
Array.from(document.styleSheets)
.filter((sheet) => {
try {
sheet.cssRules;
return true;
} catch (err) {
console.log(
`Due to CORS issues, this script can't access "${sheet.href}"`
);
return false;