Skip to content

Instantly share code, notes, and snippets.

@paveli
paveli / react-setstate-question.md
Last active May 23, 2019 10:34
question about how setState works

Hi, I have a question about how setState works in React connected to how async JavaScript works in general :)

Lets say in one class-based component I have state with nestedObject

state = {
	nestedObject: {
		propertyOne: false,
		propertyTwo: false,
		propertyAnother: false
	}
@paveli
paveli / block-tor-exit-nodes-iptables.md
Created January 16, 2019 19:22 — forked from jkullick/block-tor-exit-nodes-iptables.md
Block Tor Exit Nodes with IPTables
  1. Install ipset:
apt-get install ipset
  1. Create new ipset:
ipset create tor iphash
@paveli
paveli / 1. mailhog-install-ubuntu.sh
Last active September 18, 2023 08:10
MailHog configuration on Ubuntu Server
#!/usr/bin/env bash
#
# This shell script automates installation of MailHog on Ubuntu Server for PHP development enviroment
# Tested with Ubuntu 14.04 LTS
# Run with root privileges ($ sudo -s)
#
# Get MailHog binary and place it to /usr/local/bin/mailhog
wget -nv -O /usr/local/bin/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
0x00B4046c86922Ddf08e6Bb257357570fb9259f7F

Keybase proof

I hereby claim:

  • I am paveli on github.
  • I am paveliv (https://keybase.io/paveliv) on keybase.
  • I have a public key ASAy8WK_Av4GAcsIaD0itICN_Ce_NHwNByiA0q4qc0Pgrwo

To claim this, I am signing this object: