To keep the javascript: url smaller :). You can read the source code in the files linked in this gist
Make sure to create a bookmark with the url set to the bookmarklet code, dont just copy-paste into the URL bar
To keep the javascript: url smaller :). You can read the source code in the files linked in this gist
Make sure to create a bookmark with the url set to the bookmarklet code, dont just copy-paste into the URL bar
const fs = require('fs'); | |
const dir = fs.opendirSync('json') | |
let dirent | |
let db_out = []; | |
while ((dirent = dir.readSync()) !== null) { | |
let json = JSON.parse(fs.readFileSync(`json/${dirent.name}`)); | |
json.forEach((f) => { | |
let ts = new Date(f.ts * 1000); | |
// Get attachment title | |
if (f.attachments == undefined){ |
echo "Copyright Interfiber 2020-2021" | |
echo "Lua quickstart script." | |
echo "This script will download, and compile lua from source" | |
echo "Lua is very lightweight so this should not take that long" | |
echo "" | |
echo "" | |
echo "" | |
echo "stage: downloading lua..." | |
curl -#L https://www.lua.org/ftp/lua-5.4.2.tar.gz -o LUA_STAGE_DOWNLOAD.tar.gz | |
if ! test -f LUA_STAGE_DOWNLOAD.tar.gz; then |
// ==UserScript== | |
// @name Better XPlane Fourm | |
// @namespace https://interfiber.github.io | |
// @version 0.0 | |
// @description Make The XPlane Forum Better | |
// @author Interfiber | |
// @match https://forums.x-plane.org/* | |
// @updateURL https://gist.github.com/Interfiber/581f656b5b48f304cb019e214d9d259a/raw/better-xplane-forum.user.js | |
// @downloadURL https://gist.github.com/Interfiber/581f656b5b48f304cb019e214d9d259a/raw/better-xplane-forum.user.js | |
// @grant none |
# Generate a Github Token Under Settings/Developer Settings/Personal Access Tokens Create A New one with | |
# The gist premisson and copy and paste the string it gitves you in the place of "YOUR_AUTH_TOKEN_HERE" | |
# | |
curl -X POST -H "Authorization: token YOUR_AUTH_TOKEN_HERE" https://api.github.com/gists -d '{"public":true,"files":{"file1":{"content":"File One Content"}, "file2":{"content":"File2 content"}}}' |
use std::fs; | |
use std::env; | |
fn printIcon(fileType: String, icon: String, file: String){ | |
if file.contains(&fileType){ | |
println!("{} {}", icon, file); | |
} | |
} | |
fn main() { | |
let args: Vec<String> = env::args().collect(); | |
let mut paths = fs::read_dir(".").unwrap(); |