Skip to content

Instantly share code, notes, and snippets.

View nuggetnchill's full-sized avatar
🍌
banana

nuggie nuggetnchill

🍌
banana
View GitHub Profile
@nuggetnchill
nuggetnchill / anchor-deploy-eror.md
Last active November 17, 2021 18:14
anchor deploy error: unrecognized signer source

anchor deploy and I ran into this problem.

error: Invalid value for '--program-id <PROGRAM_ID>': unrecognized signer source There was a problem deploying: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "" }.

My filepath folder has "space" in its name .../solana sandbox/cool-project/target/deploy/chicken.so Changed it to .../solana-sandbox/cool-project/target/deploy/chicken.so

anchor deploy again and it works!

@nuggetnchill
nuggetnchill / gist:3b8f31032fc216096ca9205ff261e436
Created October 28, 2021 16:26
Harmony hardhat.config.js
require('@nomiclabs/hardhat-waffle');
require('dotenv').config();
const HARMONY_PRIVATE_KEY = process.env.PRIVATE_KEY;
module.exports = {
solidity: '0.8.0',
networks: {
testnet: {
url: 'https://api.s0.b.hmny.io',
@nuggetnchill
nuggetnchill / wp-theme-cache-fix.md
Last active December 31, 2020 16:01
Wordpress CSS not updating (cache problem)

Having trouble with your WP Page CSS not updating? Give these steps a try!

Go to functions.php in Appearance/Theme Editor

Replace wp_enqueue_style('[your theme]');

With wp_enqueue_style('[your theme]', get_template_directory_uri() . '/css/main.css', array(), filemtime(get_template_directory() . '/css/main.css'), false);

Oh and...

@nuggetnchill
nuggetnchill / countdown.js
Last active December 21, 2020 20:12
Countdown Timer with JS
// JavaScript Countdown Timer
let endDate = new Date("Dec 25, 2020 00:00:00").getTime();
const timer = setInterval(tick, 1000)
function tick () {
let currentTime = new Date().getTime();
let timeLeft = endDate - currentTime;
/*
Consider the different contexts in which you might use this dropdown and what changes might be necessary to make it more flexible.
//Answer: I would consider using React Hooks (I think Hooks makes it more readable and manageable), also in it will be more flexible to implement Redux in the future.
Follow up question
//Answer: this would be included in DropdownItem Component and wrapped within componentDidMount() life cycle method
*/
@nuggetnchill
nuggetnchill / rm-ssh-pass.md
Last active December 21, 2020 20:09
How to remove passphrase for the SSH key without having to create a new key?

How to remove passphrase for the SSH key without having to create a new key?

Opened git bash.

Enter : $ ssh-keygen -p

When prompt to enter the keyfile location, just hit ENTER for default location.

Enter old passphrase

Enter new passphrase - (leave blank and hit ENTER)

@nuggetnchill
nuggetnchill / forget_gitignore.md
Last active March 8, 2024 15:36
Removing node_modules when you forget to add .gitignore file

How to remove node_modules

  1. Create a .gitignore file in the git repo if it doesn't have one

touch .gitignore

  1. Open up the .gitignore and add the following line to the file

/node_modules