Skip to content

Instantly share code, notes, and snippets.

View AmanRaj1608's full-sized avatar
🍀
Get Schwifty!

Aman Raj AmanRaj1608

🍀
Get Schwifty!
View GitHub Profile
#![no_main]
use libfuzzer_sys::fuzz_target;
use ethereum_types::U256;
use myproject::convert_wei_to_satoshis;
fuzz_target!(|data: &[u8]| {
// fuzzed code goes here
if let Ok(s) = std::str::from_utf8(data) {
let ptoken = U256::from_dec_str(s).unwrap();
@AmanRaj1608
AmanRaj1608 / crowdfund.rs
Created November 8, 2021 19:35
basic contract on solana
use borsh::{BorshDeserialize, BorshSerialize};
use std::collections::HashMap;
use std::convert::TryInto;
use solana_program::{
account_info::{next_account_info, AccountInfo},
entrypoint,
entrypoint::ProgramResult,
msg,
program_error::ProgramError,
// open https://faucet.matic.network/
// enter public address
// got to devtools and run script
setInterval (async ()=> {
await document.getElementsByClassName("button is-link")[0].click();
await new Promise(resolve => setTimeout(resolve, 4000));
await document.getElementsByClassName("button is-success")[0].click();
}, 70000);
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Token {
address public owner;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
string public symbol = "TOKEN";
uint256 public decimals = 18;
@AmanRaj1608
AmanRaj1608 / installing-node-with-nvm.md
Created March 20, 2021 14:24 — forked from d2s/installing-node-with-nvm.md
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
Feature_1 Feature_2 Feature_3 Feature_4 Class
3.6216 8.6661 -2.8073 -0.44699 0
4.5459 8.1674 -2.4586 -1.4621 0
3.866 -2.6383 1.9242 0.10645 0
3.4566 9.5228 -4.0112 -3.5944 0
0.32924 -4.4552 4.5718 -0.9888 0
4.3684 9.6718 -3.9606 -3.1625 0
3.5912 3.0129 0.72888 0.56421 0
2.0922 -6.81 8.4636 -0.60216 0
3.2032 5.7588 -0.75345 -0.61251 0
@AmanRaj1608
AmanRaj1608 / Component.jsx
Created January 5, 2021 11:09 — forked from krambertech/Component.jsx
ReactJS: Input fire onChange when user stopped typing (or pressed Enter key)
import React, { Component } from 'react';
import TextField from 'components/base/TextField';
const WAIT_INTERVAL = 1000;
const ENTER_KEY = 13;
export default class TextSearch extends Component {
constructor(props) {
super();
@AmanRaj1608
AmanRaj1608 / git.md
Last active November 6, 2020 08:36
git: Go back to last commits

To change history commits

Rollback to some last hash then change everything then ammend changes to that commit

git reset --hard 7ab8bc40eef3c8a95271152dc1cfb63a0e4318a9
#add files
git add .
@AmanRaj1608
AmanRaj1608 / settings.json
Created June 17, 2020 21:22 — forked from thomasmaurer/settings.json
My Windows Terminal Settings settings.json June 2020
// This file was initially generated by Windows Terminal 0.11.1121.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@AmanRaj1608
AmanRaj1608 / code-jam-qualification-round-2020.cpp
Created April 5, 2020 08:15
code jam Qualification Round 2020 my codes
// AmanRaj1608
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define vi vector<ll>
#define pb push_back
#define rep(i,a,b) for(ll i = a; i<b; ++i)
#define f(a) for(ll i = 0; i<a; ++i)
#define p(a) cout << a << "\n";
#define p2(a,b) cout << a << " " << b << "\n";