Skip to content

Instantly share code, notes, and snippets.

View avegancafe's full-sized avatar

Kyle Holzinger avegancafe

View GitHub Profile
function solution(arr: number[]) {
const longestSubarrays: number[] = []
let lastElement: number | null = null
let lastDirection: 'up' | 'down' | null = null
let currentChainLength: number = 0
function sum(x: number, agg: number = 0) {
if (x == 1) {
return agg + 1
}
@avegancafe
avegancafe / fkill.fish
Created March 23, 2023 14:27
Fuzzy-find and kill processes
function fkill --description 'Fuzzy-find process and kill it'
set -l fzf_args --reverse --height 40% --no-hscroll -n 8 --ansi --multi
set -l pid
if test (id -u) -eq 0
set pid (ps -f -u $UID | sed 1d | fzf $fzf_args | awk '{print $2}')
else
set pid (ps -ef | sed 1d | fzf $fzf_args | awk '{print $2}')
end
address balance
0x6076Cec41F6a071705b996D5b5B1E2dfA10b491a 0
0x9A8657Cd661F40F621D738E19a2A2baBFcd41586 791927
0x303438790Df2f60fF1DF324373128DCF71f43720 11948051
0x5012b908520b1bc759AceFA8e1371ED4E43D9Bcd 0
0x47be3b7808b5f22a4ddb6eae5C42FD70cA62CfFA 5008840
0x6bD882CFa14d241B113B1d28fA2D658C4d11844F 7661801
0xF2353AD0930B9F7cf16b4b8300B843349581E817 0
0x2C82389e8c200093ed021FFCD639bC5198173a77 1190533
0x44bd1144F0A1CF5305F0A2ABe49E8185fAC30dE0 4065710

Keybase proof

I hereby claim:

To claim this, I am signing this object:

require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-etherscan");
require('dotenv').config();
const { API_URL, PRIVATE_KEY, ETHERSCAN_API_KEY } = process.env;
// This is a sample Hardhat task. To learn how to create your own go to
// <https://hardhat.org/guides/create-task.html>
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract TestContract is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint public constant MAX_SUPPLY = 100;
@avegancafe
avegancafe / profile.log
Created December 20, 2021 18:34
vim-go issue reproduction
This file has been truncated, but you can view the full file.
SCRIPT /Users/kyle/.local/share/nvim/site/pack/packer/start/dashboard-nvim/autoload/sessions/session.vim
Sourced 1 time
Total time: 0.001254
Self time: 0.001254
count total (s) self (s)
" Plugin: https://github.com/hardcoreplayers/dashboard-nvim
" Description: A fancy start screen for Vim.
" Maintainer: Glepnir <http://github.com/glepnir>
Oxygen is a very toxic gas and an extreme fire hazard. It is fatal in
concentrations of as little as 0.000001 p.p.m. Humans exposed to the
oxygen concentrations die within a few minutes. Symptoms resemble very
much those of cyanide poisoning (blue face, etc.). In higher
concentrations, e.g. 20%, the toxic effect is somewhat delayed and it
takes about 2.5 billion inhalations before death takes place. The reason
for the delay is the difference in the mechanism of the toxic effect of
oxygen in 20% concentration. It apparently contributes to a complex
process called aging, of which very little is known, except that it is
always fatal.
/*
*
* In order to run this:
* Get token to use with Slack API:
* 1. Go to the customize emojis admin page in slack (usually the URL is <instance-name>.slack.com/customize/emoji)
* 2. Open your networks tab and find the request to /api/emoji.adminList
* 3. Check the form data that's submitted and grab the value called "token"
*
* Use token in Slack API to get all emojis:
* 1. Go here: https://api.slack.com/methods/emoji.list/test
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<sys/socket.h>
#include<arpa/inet.h>
#include<netdb.h>
#include<signal.h>