Skip to content

Instantly share code, notes, and snippets.

Avatar

Goldzulu goldzulu

View GitHub Profile
@goldzulu
goldzulu / remove_file_from_git.md
Created June 21, 2022 17:29
Completely remove A File from GIT History
View remove_file_from_git.md

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
View solana.js
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
View fadeWithtrimToParent.json
{
"type": "APLA",
"version": "0.91",
"resources": [
{
"number": {
"fadeDuration": 500
}
}
],
@goldzulu
goldzulu / getWeekNumber.js
Created February 2, 2021 14:52
Get Week Number in Javascript
View getWeekNumber.js
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
View quickfight_apl.json
{
"type": "APL",
"version": "1.3",
"settings": {},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
"graphics": {},
View gist:4c08539a302123e92aba06e838f21369
{
"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
View ask-states.json
{
"askcliStatesVersion": "2020-03-31",
"profiles": {
"ddm": {
"skillId": "",
"skillInfrastructure": {
"@ask-cli/lambda-deployer": {
"deployState": {}
}
}
View tinderWannaBe.json
{
"type": "APL",
"version": "1.4",
"settings": {},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
"graphics": {},
@goldzulu
goldzulu / Alexa-Grid-List.json
Created July 30, 2020 20:24
Alexa Grid List Sequence
View Alexa-Grid-List.json
{
"document": {
"type": "APL",
"version": "1.4",
"theme": "dark",
"import": [
{
"name": "alexa-layouts",
"version": "1.2.0"
}
@goldzulu
goldzulu / grid sequence.json
Created July 30, 2020 20:09
Sample APL 1.4 GridSequence With Embedded Video
View grid sequence.json
{
"type": "APL",
"version": "1.4",
"settings": {},
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"onMount": [],
"graphics": {},