Skip to content

Instantly share code, notes, and snippets.

View d0v1k's full-sized avatar

ldm d0v1k

View GitHub Profile
@d0v1k
d0v1k / OkitoShiba.sol
Created November 15, 2021 15:03
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&optimize=false&runs=200&gist=
/**
____ _ _______ _______ ____ _____ _ _ _____ ____
/ __ \| |/ /_ _|__ __/ __ \ / ____| | | |_ _| _ \ /\
| | | | ' / | | | | | | | | (___ | |__| | | | | |_) | / \
| | | | < | | | | | | | |\___ \| __ | | | | _ < / /\ \
| |__| | . \ _| |_ | | | |__| |____) | | | |_| |_| |_) / ____ \
\____/|_|\_\_____| |_| \____/|_____/|_| |_|_____|____/_/ \_\
@d0v1k
d0v1k / git command.markdown
Created March 25, 2021 13:22 — forked from nasirkhan/git command.markdown
`git` discard all local changes/commits and pull from upstream

git discard all local changes/commits and pull from upstream

git reset --hard origin/master

git pull origin master

# Copied from http://ttaportal.org/wp-content/uploads/2012/10/7-Reallocation-using-LVM.pdf
##
## Showing the problem: need to reallocate 32GB from /dev/mapper/pve-data to /dev/mapper/pve-root
##
df -h
# Filesystem Size Used Avail Use% Mounted on
# /dev/mapper/pve-root 37G 37G 0 100% /
# tmpfs 2.0G 0 2.0G 0% /lib/init/rw
@d0v1k
d0v1k / firefly iii install on 18.04.md
Created January 20, 2020 14:26 — forked from philthynz/firefly iii install on 18.04.md
Firefly III install on Ubuntu18.04

Firefly III install on Ubuntu 18.04

These instructions will install Firefly III on Ubuntu 18.04. It includes setup for:

  • PHP 7.2
  • Nginx
  • MariaDB
  • Securing an Ubuntu server
  • Securing Maria DB
  • Let's Encrypt
@d0v1k
d0v1k / ubuntu-hardening.md
Created January 20, 2020 14:14 — forked from lokhman/ubuntu-hardening.md
List of things for hardening Ubuntu

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
@echo on & @setlocal enableextensions
@echo =========================
@echo Turn off the time service
net stop w32time
@echo ======================================================================
@echo Set the SNTP (Simple Network Time Protocol) source for the time server
w32tm /config /syncfromflags:manual /manualpeerlist:"0.it.pool.ntp.org 1.it.pool.ntp.org 2.it.pool.ntp.org 3.it.pool.ntp.org"
@echo =============================================
@echo ... and then turn on the time service back on
net start w32time
@d0v1k
d0v1k / vim-nginx-conf-highlight.sh
Created August 6, 2019 07:48 — forked from ralavay/vim-nginx-conf-highlight.sh
Enable syntax highlight for Nginx conf file in Vim
#!/bin/bash
#
# Highligh Nginx config file in Vim
# Download syntax highlight
mkdir -p ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O ~/.vim/syntax/nginx.vim
# Set location of Nginx config file
cat > ~/.vim/filetype.vim <<EOF
@d0v1k
d0v1k / gist:25e53ffc1c1539f4e1358b1200095911
Created August 6, 2019 05:36 — forked from kewogc/gist:1d679c6c83977d69106f
HOW TO INSTALL KANNEL ON UBUNTU
~# uname -a
~# lsb_release -a
~# locale-gen en_US
~# locale-gen en_US.UTF-8
~# apt-get -y --force-yes remove ntpdate
~# apt-get -y --force-yes install ntp
~# /etc/init.d/ntp restart
~# dpkg-reconfigure tzdata
@d0v1k
d0v1k / gist:3641fc0cd8b479d057214bb1de718034
Created July 18, 2019 12:41 — forked from okv/gist:2b0d9b6c1c73c036cabc
Icinga2: Configuration Syntax Highlighting using Vim
PREFIX=~/.vim && mkdir -p $PREFIX/{syntax,ftdetect} && curl https://raw.githubusercontent.com/Icinga/icinga2/ec75e7dcbbf8c5650197a82107969936220707c8/tools/syntax/vim/syntax/icinga2.vim > $PREFIX/syntax/icinga2.vim && curl https://raw.githubusercontent.com/Icinga/icinga2/ec75e7dcbbf8c5650197a82107969936220707c8/tools/syntax/vim/ftdetect/icinga2.vim > $PREFIX/ftdetect/icinga2.vim
@d0v1k
d0v1k / zimbra-letsencrypt-renew.md
Last active July 5, 2019 13:39 — forked from ugurerkan/zimbra-letsencrypt-renew.md
Zimbra 8.6.0 Letsencrypt SSL renew walkthrough.