Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergey Belous belous

View GitHub Profile
View Regex Cheat Sheet.md
  • Any metacharacter can be escaped using a backslash, \. This turns it back into a literal. So the regular expression c\.t means "find a c, followed by a full stop, followed by a t".
  • The backslash is a metacharacter, which means that it too can be escaped using a backslash. So the regular expression c\\t means "find a c, followed by a backslash, followed by a t".
  • The regular expression c[aeiou]t means, "find a c followed by a vowel followed by a t". In a piece of text, this will find cat, cet, cit, cot and cut.
  • The regular expression [0123456789] means "find a digit".
  • The regular expression [a] means the same as a: "find an a".
  • The regular expression [ ] means "find a space".
  • \[a\] means "find a left square bracket followed by an a followed by a right square bracket".
  • [\[\]ab] means "find a left square bracket or a right square bracket or an a or a b".
  • [\\\[\]] means "find a backslash or a left square bracket or a right square bracket". (Urgh!)
  • [b-f] is the same as `[bc
View gist:011905e69ed6c21a3e92680682a4011c
gocode
gopkgs
go-outline
go-symbols
guru
gorename
godef
goreturns
golint
gotests
@belous
belous / packages.txt
Created Dec 7, 2016
My packages set for Sublime Text 3
View packages.txt
General:
Package Control https://packagecontrol.io/installation
GitGutter
Diffy
SublimeREPL
Remote editing:
rsub
Rsync SSH
@belous
belous / config.fish
Last active Dec 8, 2016
Add GOPATH and add it to PATH for fish
View config.fish
set -x GOPATH $HOME/code/go
set -gx PATH $GOPATH/bin $PATH
@belous
belous / local.conf
Last active Aug 16, 2016
devstack with lbaasv2
View local.conf
[[local|localrc]]
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=$ADMIN_PASSWORD
# Enable Logging
LOGFILE=$DEST/logs/stack.sh.log
VERBOSE=True
@belous
belous / local.conf
Created May 11, 2016
Minimal local.conf for devstack with lbassv2
View local.conf
[[local|localrc]]
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=$ADMIN_PASSWORD
# Enable Logging
LOGFILE=$DEST/logs/stack.sh.log
VERBOSE=True
@belous
belous / local.conf
Last active Jul 12, 2016
Minimal local.conf for lightweight devstack only with keystone, nova, neutron, glance, cinder and horizon
View local.conf
[[local|localrc]]
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=$ADMIN_PASSWORD
RECLONE=false
# disable everything!
@belous
belous / Preferences.sublime-settings
Last active Dec 7, 2016
My preferences for Sublime Text 3 oriented to everyday using (on retina display)
View Preferences.sublime-settings
{
"auto_complete": false,
"auto_complete_commit_on_tab": false,
"bold_folder_labels": false,
"caret_style": "phase",
"color_scheme": "Packages/Theme - Primer/primer.light2.tmTheme",
"dictionary": "Packages/Language - English/en_US.dic",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"find_selected_text": true,
View local.conf
node1
ip: 192.168.200.197
local.conf:
[[local|localrc]]
RECLONE=yes
DATABASE_PASSWORD=admin
RABBIT_PASSWORD=admin
SERVICE_TOKEN=admin
SERVICE_PASSWORD=admin
@belous
belous / new_system_install.sh
Last active Dec 23, 2016
Some script that makes fresh installed linux more user-friendly
View new_system_install.sh
#!/bin/sh
# install git and zsh
sudo apt-get install git zsh -y
# install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# configure zsh
sed -i 's/plugins=(git)/plugins=(gitfast)/g' ~/.zshrc
You can’t perform that action at this time.