Skip to content

Instantly share code, notes, and snippets.

@mina86
mina86 / osmosis-install.md
Created July 6, 2023 16:39
Installing and starting mainnet osmosisd

The Osmosis Installer script is a bit broken and it needs some help to get working. Most notably, it’ll delete ~/.osmosisd directory and then complain that it doesn’t exist. Thankfully this is relatively simple to fix.

cd
curl -sL https://get.osmosis.zone/install > install.py

patch -p1 <<EOF

Keybase proof

I hereby claim:

  • I am mina86 on github.
  • I am mina86 (https://keybase.io/mina86) on keybase.
  • I have a public key whose fingerprint is AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4

To claim this, I am signing this object:

@mina86
mina86 / version.py
Last active December 10, 2022 04:07 — forked from dcreager/version.py
Extract a setuptools version from the git repository's tags.
# -*- coding: utf-8 -*-
"""Calculates the current version number.
If possible, uses output of “git describe” modified to conform to the
visioning scheme that setuptools uses (see PEP 386). Releases must be
labelled with annotated tags (signed tags are annotated) of the following
format:
v<num>(.<num>)+ [ {a|b|c|rc} <num> (.<num>)* ]
line() {
local line=--------------------
while [ ${#line} -lt $COLUMNS ]; do
line=$line$line
done
printf "%.$(($COLUMNS - 9))s %(%H:%M:%S)T\\n" "$line" -1
}
@mina86
mina86 / aux.c
Last active November 26, 2021 15:00
Code reading auxiliary vector present in executable binary.
#define _GNU_SOURCE
#include <linux/auxvec.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
static unsigned long *getauxv(void) {
char **env = environ;
@mina86
mina86 / xd
Created November 5, 2011 05:58
#!/bin/sh
set -eu
do_zip() {
unzip -x "$2"
}
do_rar() {
@mina86
mina86 / self-print.c
Created May 4, 2011 23:33
Self printing C program
#include <stdio.h>
int main() {
const char *fmt = "#include <stdio.h>%c%cint main() {%c const char *fmt = %c%s%c;%c printf(fmt, 10, 10, 10, 34, fmt, 34, 10, 10, 10, 10);%c return 0;%c}%c";
printf(fmt, 10, 10, 10, 34, fmt, 34, 10, 10, 10, 10);
return 0;
}
@mina86
mina86 / gist:729036
Created December 5, 2010 11:59
tree.sh
#!/bin/sh
# See http://damienix.jogger.pl/2010/12/01/skrypt-bashowy-wyswietlajacy-drzewko-struktury-katalogow/
clr_dir='\33[1;34m' # Blue
clr_fil='\33[0;33m' # Yellow
clr_rst='\33[0m' # Text Reset
chain() {
# $1 $2 - no change
@mina86
mina86 / fib.c
Created January 16, 2010 22:21 — forked from rsayers/fib.c
#include <stdio.h>
static unsigned long count;
static unsigned long fib(unsigned n) {
++count;
return n > 1 ? fib(n - 1) + fib(n - 2) : n;
}
int main(void) {
unsigned i;
@mina86
mina86 / ltp-2.cpp
Created January 16, 2010 13:28
Program calculating LTPs (Left-Truncatable Primes)
/*
* Oryginal by "ProgramistaBezDoswiadczenia!"
* At this point highly modified.
* See http://hoppke.jogger.pl/2010/01/13/cwiczenie-programistyczne/
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>