Skip to content

Instantly share code, notes, and snippets.

View velppa's full-sized avatar
🎯
Focusing

Pavel Popov velppa

🎯
Focusing
View GitHub Profile
@velppa
velppa / gist:4204077a9fef4fca89b73c25b588eac1
Created January 26, 2021 18:33 — forked from cdown/gist:1163649
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in
package main
import (
"fmt"
"strings"
)
func CompareTwoStrings(stringOne, stringTwo string) float32 {
removeSpaces(&stringOne, &stringTwo)

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@velppa
velppa / docker.md
Last active May 30, 2019 21:29 — forked from ngpestelos/remove-docker-containers.md
Docker cheat sheet

Delete all containers

docker ps -q -a | xargs docker rm

-q prints only the container IDs -a prints all containers

@velppa
velppa / install-tmux
Last active August 27, 2015 05:40 — forked from rothgar/install-tmux
Install tmux 2.0 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local