Skip to content

Instantly share code, notes, and snippets.

Nathan Flurry NathanFlurry

Block or report user

Report or block NathanFlurry

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
@NathanFlurry
NathanFlurry / README.md
Last active Aug 10, 2019
Inkdrop Import Markdown Files
View README.md

About

This script will import Markdown files from a folder. It will only import files ending in .md, so it skips folders and images. This will use the file name as the note name. If there is a H1 on the first line, it will remove that line and trim the file in order to remove redundancy.

How to use

  1. Select the notebook you want to import into in the sidebar.
  2. Under Inkdrop, select Developer > Toggle Developer Tools.
  3. Paste this script.
  4. Replace path/to/folder/with/markdown/files/ with a path to the folder with the markdown files in it. Make sure to include the trailing "/".
  5. Ignore the error and please forgive my laziness. If you get a grey screen, just click a few times and the ghost windows will disappear.
@NathanFlurry
NathanFlurry / ClassifiedTokenAuthenticationMiddleware.swift
Created May 26, 2017
Like `TokenAuthenticationMiddleware`, but can declare a private and public token for a single object.
View ClassifiedTokenAuthenticationMiddleware.swift
import Fluent
import Authentication
/// Copy of `TokenAuthenticationMiddleware` middleware that uses classified tokens. This way, objects can use
/// private and public tokens.
public final class ClassifiedTokenAuthenticationMiddleware<U: TokenAuthenticatable>: Middleware {
public let isPrivate: Bool
public init(_ userType: U.Type = U.self, isPrivate: Bool) {
self.isPrivate = isPrivate
@NathanFlurry
NathanFlurry / ExampleCode.lua
Created May 24, 2014
You also need to have https://github.com/Zoyt/EasyiAP included in your project.
View ExampleCode.lua
-- In setup
iapItems = {}
registerItem("itemIDOne")
registerItem("itemIDTwo")
initStore()
storeReady = false
purchasePending = false
-- Purchasing the item
purchaseItem(itemNum) -- Number of the item registered in order; i.e. 0 would be 'itemIDOne' and 1 would be 'itemIDTwo'
View Sketch3DExtrusion.sketchplugin
Math.lerp = function(a,b,f) {
return Number(a) + f * (Number(b) - Number(a));
}
Math.radians = function(degrees) {
return degrees * Math.PI / 180;
};
Math.degrees = function(radians) {
return radians * 180 / Math.PI;
@NathanFlurry
NathanFlurry / Main.lua
Created Dec 31, 2013
Entry for the 2013 Codea Holiday Codea Cook Off Competition.
View Main.lua
--# Main
displayMode(FULLSCREEN_NO_BUTTONS)
supportedOrientations(LANDSCAPE_ANY)
function setup()
AssetLoader:init(
{
KAStar = "star.png",
KAPuff = "puff.png",
@NathanFlurry
NathanFlurry / Main.lua
Created Dec 24, 2013
Shatter a mesh into physical triangles
View Main.lua
--# Main
function setup()
m = mesh()
m.visible = true
fragments = {}
parameter.number("meshScale",10,400,150)
@NathanFlurry
NathanFlurry / Main.lua
Created Dec 16, 2013
December 2013 Ludum Dare entry.
View Main.lua
--# Main
displayMode(FULLSCREEN_NO_BUTTONS)
function setup()
parameter.boolean("rotateCamera",true)
lastScore = readLocalData("lastScore",0)
highscore = readLocalData("highscore",0)
StateMachine:init()
@NathanFlurry
NathanFlurry / 3D StackIt Prototype
Created Oct 7, 2013
Today, I wanted to learn in depth how to use the 3D aspect of Codea, so I embarked on making a simple 3D prototype of my game StackIt. Please note, there's tons of bugs, but I needed to keep working on the actual StackIt, so I stopped the development there.
View 3D StackIt Prototype
--# Main
displayMode(FULLSCREEN)
supportedOrientations(PORTRAIT_ANY)
function setup()
bg = getGradient(vec2(WIDTH,HEIGHT),color(0,90,255),color(50,190,255))
Game:init()
end
You can’t perform that action at this time.