Skip to content

Instantly share code, notes, and snippets.

View maczniak's full-sized avatar

Jeon Jeongho maczniak

View GitHub Profile
@maczniak
maczniak / semaphore-v4-ceremony_attestation.log
Created June 13, 2024 05:23
Attestation for Semaphore V4 Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm maczniak-3060954 and I have contributed to the Semaphore V4 Ceremony.
The following are my contribution signatures:
Circuit # 1 (semaphorev4-1)
Contributor # 69
Contribution Hash:
6a3a77a0 fa344d14 96f326cc 4d59dcfc
9c47f271 2200c8b2 89cdb38a 2bed5307
fc947466 7dd0e8d4 baf4d0b5 0ac34c6c
a2304769 1ccddd69 31fbec4a 059f93e2
@maczniak
maczniak / gist:7399fe4874d9177e856e58a0c124468d
Created January 5, 2024 09:27
images for metamask pull request
placeholder
@maczniak
maczniak / portfolio_tracker.pine
Created December 11, 2023 12:04
simple portfolio tracker for TradingView
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © FriendOfTheTrend
// Portfolio Tracker For Stocks & Crypto https://tradingview.com/script/awMm3eHA-Portfolio-Tracker-For-Stocks-Crypto/
// updated by Jeongho Jeon
//@version=5
indicator("Portfolio Tracker", shorttitle="Portfolio Tracker", overlay=true)
// EDIT HERE (START)
// limit: #ticker + #ticker * #gap <= 40
@maczniak
maczniak / linux-user-guide-1.md
Created July 14, 2023 01:32
Linux User Guide

standard input/output/error

유닉스는 모든 입출력을 파일로 봅니다. 파일을 읽고쓰는 것은 물론이고 하드웨어 센서와 네트워크 등도 마치 파일을 읽고쓰는 것처럼 처리합니다. 프로세스가 파일/네트워크/하드웨어 입출력을 하려고 대상을 열면(유닉스 시스템호출 open()) (정수값인) file descriptor가 생깁니다. 줄여서 fd라고 쓰고, /proc/PID/fd에 보이는 그 fd입니다. 우리가 /etc/security/limits.conf 파일에 nofile을 설정하면, 프로그램의 최대 fd 개수가 늘어나고 ulimit -a 출력의 open files 줄에서 확인할 수 있습니다.

프로그램을 실행하면, 쉘은 세가지 fd를 만들어서 프로그램에 붙입니다.

## shebang https://ko.wikipedia.org/wiki/%EC%85%94%EB%B1%85 참고
#!/bin/sh
src_dir="contrib"
near_postfix="near"
network="mainnet"
near_source="nearcore" # nearcore or datalake
migrate_from=""
use_snapshots=1
@maczniak
maczniak / Cargo.toml
Last active May 12, 2023 07:46
volatile global variable test in Rust (please use ArcSwap instead)
[package]
name = "memory-leak-test"
version = "0.0.1"
edition = "2021"
[dependencies]
actix-rt = "2.8"
actix-web = "4"
env_logger = "0.10"
log = "0.4"
// https://leetcode.com/problems/longest-common-prefix/
impl Solution {
pub fn longest_common_prefix(strs: Vec<String>) -> String {
let mut ret = String::from("");
let mut idx = 0;
let mut other_char;
loop {
other_char = None;
for str in &strs {
use std::iter::zip;
use std::str::FromStr;
fn main() {
println!("Input racing car names with comma separation:");
let input_names = "pobi,crong,honux\n";
println!("{}", input_names);
let names : Vec<&str> = input_names.split(',').map(|w| w.trim()).collect();
if names.iter().any(|w| w.len() > 5) {
panic!("A racing car name must be less than 6 characters.");
// use std::collections::HashMap;
fn sorted_count<T: std::cmp::PartialEq + Copy>(entries: &Vec<T>) -> Vec<(T, u32)> {
let mut result = Vec::new();
let mut previous = &entries[0];
let mut count : u32 = 0;
for entry in entries {
if entry == previous {
count += 1;
} else {
@maczniak
maczniak / sample.py
Created April 23, 2020 04:25
Python3 urllib.request debug (request and response details)
import urllib.request
# debug setting
http_handler = urllib.request.HTTPHandler(debuglevel=1)
try:
import ssl
https_handler = urllib.request.HTTPSHandler(debuglevel=1)
opener = urllib.request.build_opener(http_handler, https_handler)
except ImportError:
opener = urllib.request.build_opener(http_handler)