Skip to content

Instantly share code, notes, and snippets.

View fullkomnun's full-sized avatar

Or Noyman fullkomnun

View GitHub Profile
@fullkomnun
fullkomnun / devgenesis.json
Last active June 25, 2024 05:18
Uniswap V3 pre-deployed contracts (including WETH9, UniswapV2Factory, all core Uniswap V3 components including 'Permit2' and 'UniversalRouter') to same deployment addresses as in Ethereum mainnet, assumes deployer/owner to be '0x4242424242424242424242424242424242424242' and chainid to be 59000
{
"config": {
"chainId": 59000,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
@fullkomnun
fullkomnun / unpm.sh
Last active May 28, 2024 10:33
A universal JS package manager API and aliases, detects and supports npm, yarn berry (2+) and pnpm
#!/usr/bin/env sh
find_up() {
path=$(pwd)
while [ "$path" != "" ]; do
if [ -f "$path/$1" ]; then
echo "$path/$1"
return 0
elif [ -d "$path/.git" ] || [ -f "$path/pnpm-workspace.yaml" ]; then # stop at Git root or pnpm workspace root
break
@fullkomnun
fullkomnun / restart_zoom.applescript
Created August 23, 2021 13:49
Restart iriun webcam + zoom
set zoomAppName to "zoom.us"
tell application zoomAppName to quit
repeat
tell application "System Events"
if zoomAppName is not in (name of application processes) then exit repeat
end tell
do shell script "sleep 0.5"
end repeat
set iriunAppName to "IriunWebcam"
tell application iriunAppName to quit
@fullkomnun
fullkomnun / .openapi-generator-ignore
Created May 16, 2021 07:51
openapi generator java retrofit2 template
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
@fullkomnun
fullkomnun / keybase.md
Created January 13, 2021 20:22
keybase.md

Keybase proof

I hereby claim:

  • I am fullkomnun on github.
  • I am fullkomnun (https://keybase.io/fullkomnun) on keybase.
  • I have a public key ASBjHkwxbFrgXHFFR7inDXyp3_4T9QoHzVtYISH0KBJk2wo

To claim this, I am signing this object:

@fullkomnun
fullkomnun / gitignore.sh
Last active October 30, 2019 21:29
Git ignore beyond .gitignore
# There are times when you want to ignore files that are already managed with Git locally.
# This can be achieved using `git update-index` command.
# For ignoring entire paths recursively, one can use the following commands:
git ls-files -z <path> | xargs -0 git update-index --skip-worktree
git ls-files -z <path> | xargs -0 git update-index --assume-unchanged
# Aliases can be created to ease usage:
# checks for any files flagged w/ --skip-worktree alias
@fullkomnun
fullkomnun / gitignore.md
Created October 30, 2019 21:25
Git ignore beyond .gitignore

There are times when you want to ignore files that are already managed with Git locally. This can be achieved using git update-index command.

For ignoring entire paths recursively, one can use the following commands: $ git ls-files -z | xargs -0 git update-index --skip-worktree $ git ls-files -z | xargs -0 git update-index --assume-unchanged

Aliases can be created to ease usage:

checks for any files flagged w/ --skip-worktree alias

check="git ls-files -v|grep '^S'"

@fullkomnun
fullkomnun / DockerFile
Created October 10, 2019 12:52
A docker file for installation of softhsm2 based on java-centos-openjdk8-jdk
FROM fabric8/java-centos-openjdk8-jdk
LABEL maintainer=fullkomnun
ENV SOFTHSM2_CONF=/etc/softhsm2.conf
USER root
RUN set -xe; \
yum update -y && \
# mount the drive as read/write
mount -rw /
 
# create a directory for "disabled" extensions
mkdir /Volumes/Macintosh\ HD/Library/ExtensionsDisabled
 
# view files that exist in your Extensions folder but not the recovery partition
kexts=`comm -23 <(ls /Volumes/Macintosh\ HD/Library/Extensions|sort) <(ls /Library/Extensions|sort)`
echo $kexts
 
@fullkomnun
fullkomnun / collect_containers_logs.sh
Created June 3, 2019 14:42
A bash script that writes all logs from running docker containers to files called <container_name>.log and compresses these into an archive
#!/bin/bash
set -xe
for name in $(docker ps --format "{{.Names}}"); do
eval "docker logs \"$name\" 2> ${name}.log";
done
eval "env GZIP=-9 tar cvzf logs.tar.gz *.log"