Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

AndreAntonov frizbee

🎯
Focusing
Block or report user

Report or block frizbee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Deploy a Rails App with Puma and Nginx on Ubuntu 16.04.md

install nodejs

sudo apt-get update
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs yarn
@frizbee
frizbee / ctags.setup
Last active Dec 30, 2019 — forked from nazgob/ctags.setup
ctags setup on mac
View ctags.setup
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
> ctags: illegal option -- R
> usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
@frizbee
frizbee / password_regex.md
Last active Nov 5, 2019
Regex for password must contain
View password_regex.md

Minimum eight characters, at least one letter and one number:

/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/

Minimum eight characters, at least one letter, one number and one special character:

/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,}$/

Minimum eight characters, at least one uppercase letter, one lowercase letter and one number:

@frizbee
frizbee / elastic_common_used.md
Created Sep 23, 2019
Some of the calls to elastic search
View elastic_common_used.md

GET

Simple

curl -X GET "localhost:9200/twitter"

More complicated

curl -X GET "localhost:9200/_search" -H 'Content-Type: application/json' -d'
{
@frizbee
frizbee / lock_screen_mac.md
Last active Sep 11, 2019
easy lock screen one line command for your mac
View lock_screen_mac.md

Add following line into your .zshrc or .bash_profile

alias lock='/System/Library/CoreServices/Menu\ Extras/user.menu/Contents/Resources/CGSession -suspend'

type lock in your terminal to lock screen

@frizbee
frizbee / setup_new_mac_env.md
Last active Sep 10, 2019
Setup new Mac dev environment Mojave
View setup_new_mac_env.md

Setup new Mac dev env

Homebrew

Setup brew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

You can’t perform that action at this time.