Skip to content

Instantly share code, notes, and snippets.

View goldzulu's full-sized avatar

Goldzulu goldzulu

View GitHub Profile
@goldzulu
goldzulu / MetagineersCLA.md
Created May 17, 2023 21:00
Metagineers Ltd Individual Contributor License Agreement

Metagineers Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Metagineers Ltd or its affiliates (“Metagineers”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Metagineers in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact info@Metagineers.com.

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to Metagineers a non

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"$metadata": {
"uris": {
"jsonLdContext": "https://raw.githubusercontent.com/LastingAsset/claim-schema-vocab/main/json-ld/studentgrade.json-ld"
}
},
"required": [
"@context",
@goldzulu
goldzulu / remove_file_from_git.md
Created June 21, 2022 17:29
Completely remove A File from GIT History

Completely remove a file from Git history permalink

To remove the file altogether, we can use the following command. Assuming .env is the file to remove

git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD You will get some warnings about this messing up your history as this goes through your whole history and 100% removes its occurrence.

To push this, you have to run the following command.

git push --force

@goldzulu
goldzulu / solana.js
Created April 25, 2022 01:37
Solana Snippets
import {
Account,
clusterApiUrl,
Connection,
PublicKey,
sendAndConfirmTransaction,
SystemProgram,
Transaction,
} from '@solana/web3.js';
@goldzulu
goldzulu / fadeWithtrimToParent.json
Last active March 30, 2021 23:05
APLA - Making FadeIn,FadeOut Work when using trimToParent
{
"type": "APLA",
"version": "0.91",
"resources": [
{
"number": {
"fadeDuration": 500
}
}
],
@goldzulu
goldzulu / updateSkillEndpoint.js
Last active February 7, 2021 04:17
node js executable script to change the lambda endpoints from command line E.g. Usage: node ./updateSkillEndpoint.js --url https://letmypeoplesleep.com ... or if you have ngrok running, can use node ./updateSkillEndpoint.js --ngrok ... you can optionally attached tunnelName to the --ngrok param if you have multiple tunnels.
#! /usr/bin/env node
// node.js script to update the endpoint at the ADC to a local endpoint
// Originally written by @Voicetechguy1 twitch.tv/goldzulu
// This file is to be placed at the root of the Alexa Skill Project
// currently works only for ASK2 CLI
// Get the arguments from the command line and use the default below if none is given
// e.g. node ./updateSkillEndpoint.js --url https://letmypeoplesleep.com
// if you are using ngrok and ngrok is running before running this script
@goldzulu
goldzulu / getWeekNumber.js
Created February 2, 2021 14:52
Get Week Number in Javascript
function getWeekNumber(d) {
// Copy date so don't modify original
d = new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()));
// Set to nearest Thursday: current date + 4 - current day number
// Make Sunday's day number 7
d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay()||7));
// Get first day of year
var yearStart = new Date(Date.UTC(d.getUTCFullYear(),0,1));
// Calculate full weeks to nearest Thursday
var weekNo = Math.ceil(( ( (d - yearStart) / 86400000) + 1)/7);
@goldzulu
goldzulu / quickfight_apl.json
Created October 10, 2020 15:04
Quick Fight Char APL Selection
{
"type": "APL",
"version": "1.3",
"settings": {},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
"graphics": {},
{
"document": {
"type": "APL",
"version": "1.4",
"settings": {},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
@goldzulu
goldzulu / ask-states.json
Created September 17, 2020 15:54
To reset the skill place ask-states.json in the .ask folder and skill.json to the skill-package folder. Running ask deploy after will recreate all the infrastructure again
{
"askcliStatesVersion": "2020-03-31",
"profiles": {
"ddm": {
"skillId": "",
"skillInfrastructure": {
"@ask-cli/lambda-deployer": {
"deployState": {}
}
}