Skip to content

Instantly share code, notes, and snippets.

View romanitalian's full-sized avatar
🎯
Focusing

roman romadin romanitalian

🎯
Focusing
View GitHub Profile
@romanitalian
romanitalian / trike_in_js.js
Created December 17, 2019 09:50
make trike string "js" in js
"1"
+!+[]+[]
1
+!+[]
+!+``
0
+!+`` -!-[]
alias ls='ls -GFh'
alias ll='ls -lah'
alias t='tig'
alias du='du -h'
alias dus='du -hs * | sort -hr'
alias gd='git diff'
alias gdc='git diff --cached'
alias gh='git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
alias gs='git status'
alias gus='dus'
@romanitalian
romanitalian / wp_make_new_site.sh
Last active November 26, 2024 14:51
BASH script to make new WP site: download and WP, configure and restart NGINX; install/make wordpress site by Bash script; wordpress install; wordpress configuration; wordpress initialisation
#!/bin/bash
# -------------------------------------------------
# Make site directory
# Download WP and install WP to site directory
# Set WP configuration
# Configure NGINX for new domain-name
# -------------------------------------------------
# apt-get update
package main
import (
"fmt"
"sync"
)
type mutexCounter struct {
mu sync.Mutex
x int64
package main
import (
"fmt"
"runtime"
"sync"
"sync/atomic"
)
type atomicCounter struct {
@romanitalian
romanitalian / assertion-and-interface.go
Last active November 30, 2019 19:48
golang methods - pointers vs value
package main
import (
"fmt"
)
type CodeError struct {
text string
code string
}
@romanitalian
romanitalian / duplicate_func_main.go
Created April 15, 2019 06:54
"go build main.go" vs "go build ."
// $ tree
// .
// ├── main.go
// ├── second.go
// ```go build main.go```
// or
// ```go build .```
@romanitalian
romanitalian / conky.conf
Created March 22, 2019 12:28
default them conky. | vim /etc/conky/conky.conf
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo
Any original torsmo code is licensed under the BSD license
All code written since the fork of torsmo is licensed under the GPL
Please see COPYING for details
@romanitalian
romanitalian / conky.conf
Created March 22, 2019 12:27
vim /etc/conky/conky.con
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo
Any original torsmo code is licensed under the BSD license
All code written since the fork of torsmo is licensed under the GPL
Please see COPYING for details
package main
import (
"fmt"
"time"
"github.com/go-redis/redis"
)
var RedisClient *redis.Client