Skip to content

Instantly share code, notes, and snippets.

Avatar
Per aspera ad astra.

Rastislav raisty

Per aspera ad astra.
View GitHub Profile
@raisty
raisty / .XCompose
Created Mar 23, 2021
Crypto/Core definitions for tthe Compose key (AltGr)
View .XCompose
<Multi_key> <o> <r> <e> : "ø"
<Multi_key> <O> <R> <E> : "Ø"
<Multi_key> <n> <u> <c> <l> <e> : "ꞥ"
<Multi_key> <n> </> : "ꞥ"
<Multi_key> <m> <o> <l> <i> : "₥"
<Multi_key> <c> <o> <r> <e> : "₡"
<Multi_key> <C> <O> <R> <E> : "₡"
<Multi_key> <c> </> </> : "₡"
<Multi_key> <C> </> </> : "₡"
<Multi_key> <a> <e> <r> : "₳"
@raisty
raisty / .zshrc
Last active Mar 15, 2021
Z shell basic setup
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/$(whoami)/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@raisty
raisty / .zsh_aliases
Last active Feb 28, 2021
ZSH Aliases - XCORE pack
View .zsh_aliases
###XCORE+###
## sudo alias
alias sudo='sudo '
# Use color
alias dir="dir --color=auto"
alias grep="grep --color=auto"
alias dmesg='dmesg --color'
# Extended listing
@raisty
raisty / about:config.txt
Created Nov 29, 2020
Make Firefox scrolling smooth on Ubuntu
View about:config.txt
general.smoothScroll;true
general.smoothScroll.currentVelocityWeighting;0.15
general.smoothScroll.mouseWheel.durationMaxMS;250
general.smoothScroll.mouseWheel.durationMinMS;250
general.smoothScroll.msdPhysics.enabled;true
general.smoothScroll.msdPhysics.motionBeginSpringConstant;400
general.smoothScroll.msdPhysics.regularSpringConstant;600
general.smoothScroll.msdPhysics.slowdownMinDeltaMS;120
general.smoothScroll.other.durationMaxMS;500
general.smoothScroll.pages.durationMaxMS;350
@raisty
raisty / blockchain-running.sh
Last active Sep 9, 2020
Check if Blockchain is listening to network
View blockchain-running.sh
["CMD-SHELL", "connected=$(gocore net.listening); if [ $connected ]; then exit 0; else exit 1; fi"]
@raisty
raisty / spa-redirection.sh
Created Sep 9, 2020
Single Page Application redirection
View spa-redirection.sh
### Apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
View export-devin-enode.sh
./gocore --datadir=/.devindata --networkid 3 --exec "admin.nodeInfo.enode" attach
@raisty
raisty / server-ubuntu-focal-fossa-init.sh
Last active Jul 26, 2020
Prepare Ubuntu 20.04 with initial changes
View server-ubuntu-focal-fossa-init.sh
#!/bin/sh
SSHD_LOC=/etc/ssh/sshd_config
MOTD_LOC=/etc/motd
LOGO="╔═╗┌─┐┬─┐┬ ┬┌─┐┬─┐\
╚═╗├┤ ├┬┘└┐┌┘├┤ ├┬┘\
╚═╝└─┘┴└─ └┘ └─┘┴└─\
══════════════════════════════════════════════════\
TYPE: $1\
OS: $(lsb_release -d | cut -f2-)\
View icanlist.go
var countries = map[string]CountrySettings{
"AD": CountrySettings{Length: 24, Format: "F04F04A12"},
"AE": CountrySettings{Length: 23, Format: "F03F16"},
"AL": CountrySettings{Length: 28, Format: "F08A16"},
"AT": CountrySettings{Length: 20, Format: "F05F11"},
"AZ": CountrySettings{Length: 28, Format: "U04A20"},
"BA": CountrySettings{Length: 20, Format: "F03F03F08F02"},
"BE": CountrySettings{Length: 16, Format: "F03F07F02"},
"BG": CountrySettings{Length: 22, Format: "U04F04F02A08"},
"BH": CountrySettings{Length: 22, Format: "U04A14"},
@raisty
raisty / iso31661alpha2crypto.js
Last active Jul 16, 2020
ISO 3166-1 alpha-2 country code to country name + crypto codes
View iso31661alpha2crypto.js
var countryNames = {
'AB' : 'Core Blockchain (Testnet)',
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',