Skip to content

Instantly share code, notes, and snippets.

View qnxdev's full-sized avatar
🎯
Invest in ideas, not in emotions.🤨

ASG qnxdev

🎯
Invest in ideas, not in emotions.🤨
View GitHub Profile
@qnxdev
qnxdev / ls.txt
Last active November 13, 2023 09:31
Low Supply
https://coinmarketcap.com/currencies/auto/
https://coinmarketcap.com/currencies/illuvium/
https://coinmarketcap.com/currencies/chrono-tech/
https://coinmarketcap.com/currencies/spookyswap/
https://coinmarketcap.com/currencies/whale/#Chart
https://coinmarketcap.com/currencies/oraichain-token/
https://coinmarketcap.com/currencies/trustswap/
https://coinmarketcap.com/currencies/waltonchain/#Markets
https://coinmarketcap.com/currencies/easyfi/
https://coinmarketcap.com/currencies/barnbridge/#Markets
@qnxdev
qnxdev / SmartContractWill.sol
Created March 1, 2022 18:38
Sample Smart Contract Will
// SPDX-License-Identifier: MIT
pragma solidity =0.8.12;
contract Trust {
struct Kid {
uint amount;
uint maturity;
bool paid;
}
@qnxdev
qnxdev / MyTestToken.sol
Created March 1, 2022 18:37
My Test Token Contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
contract MyTestToken {
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowance;
uint public totalSupply = 10000 * 10 ** 18;
string public name = 'My Test Token';
string public symbol = 'MTT';
uint public decimals = 18;
@qnxdev
qnxdev / setImageToLocalstorage.js
Last active May 9, 2021 07:13
Storing image in localStorage in React
import { useEffect } from "react";
export default function SetImage() {
const saveImage = (e) => {
const file = e.target.files[0];
const reader = new FileReader();
reader.onloadend = () => {
// convert file to base64 String
const base64String = reader.result
.replace("data:", "")
@qnxdev
qnxdev / callback.js
Created August 30, 2020 14:02
LinkedIn OAuth callback api function for NextJS, ReactJS
export default async (req, res) => {
const LINKEDIN_URL = "https://www.linkedin.com/oauth/v2/accessToken&grant_type=authorization_code&code=" + req.query.code + "redirect_uri=http://localhost:3000/api/callback&client_id=your_id is at https://www.linkedin.com/developers/apps/&client_secret=your_secret is at https://www.linkedin.com/developers/apps/";
let tok;
let resp = await fetch(LINKEDIN_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
});
if (resp.ok) tok = await resp.json();
@qnxdev
qnxdev / gist:ccae69c52247a2e785821ed32281f5a4
Created May 4, 2020 04:58
Create 404 Page for in React
In App.js
First add import
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
Then,
in Class in render() method in Routes,
render() {
return (
<Router>
<Switch>
<Route exact path='/'><Home /></Route> //Home Page maybe
@qnxdev
qnxdev / gist:eef3fd5e6b40fdf140dcf724cbe8f507
Created May 3, 2020 10:13
python setup.py uninstall - Uninstall Apps installed using setup.py
Note: Avoid using python setup.py install use pip install .
You need to remove all files manually, and also undo any other stuff that installation did manually.
If you don't know the list of all files, you can reinstall it with the --record option, and take a look at the list this produces.
To record a list of installed files, you can use:
python setup.py install --record files.txt
@qnxdev
qnxdev / gist:50267f35691c42d7be1aad7547698be5
Last active May 3, 2020 09:21
Screen Recorder on / for Fedora 32
The built-in GNOME and Cinnamon screen recorder can be started and stopped using the Ctrl + Alt + Shift + R keyboard shortcut.
It doesn't record sound anyway and is limited to short duration of 30 seconds.
This limit can be changed using:
gsettings set org.gnome.settings-daemon.plugins.media-keys max-screencast-length 600
Another solution is a Gnome extension.
https://extensions.gnome.org/extension/690/easyscreencast/ is a gnome extension that enables screen recording in Fedora or any device with Gnome.
It has the ability to record device audio.