Skip to content

Instantly share code, notes, and snippets.

View starikovs's full-sized avatar
👨‍💻
Coding

Viacheslav Starikov starikovs

👨‍💻
Coding
View GitHub Profile
--- cwd Projects/long-dialog ---
:CtrlP
:CtrlP site
-- when CtrlP is open ---
F5 - cache
c-f - forward
c-b - back
c-d - path/file
--- text ---
(many of these commands may be combined with ⇧ Shift to select a region of text)
Cmd + right, Cmd + left (end and beginning of line)
Opt + right, Opt + left (end and beginning of word)
Cmd + up, Cmd + down (beginning and end of document)
brew update; # update packages' info
brew upgrade; # upgrade outdated packages
brew install <some_package>; # install package which you want
brew install vim
brew install mysql
brew doctor
brew search vim
@starikovs
starikovs / linux
Last active August 29, 2015 13:56
--- ls ---
ls -dl */ (list only directories)
ls -l | grep "^d"
--- copy ---
rsync options source destination (http://cloudtips.org/rsync.html)
rsync -zvr /tmp/helloworld/ /root/message
@starikovs
starikovs / git
Last active August 29, 2015 13:57
--- install git ---
git ---version (in Debian git is installed)
dpkg -s git | grep Status
dpkg -s git
apt-cache pkgnames git
apt-get install git
--- bare repo on server ---
--- get laravel.phar ---
wget http://laravel.com/laravel.phar
sudo mv laravel.phar /usr/local/bin/laravel
sudo chmod +x /usr/local/bin/laravel
which laravel
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5-curl
@starikovs
starikovs / bash
Last active August 29, 2015 14:00
--- basic moves ---
ctrl+b (move back one character)
ctrl+f (move forward one character)
ctrl+d (delete current character)
backspace/mac delele (delete previous character)
ctrl+- (undo)
--- moving faster ---
@starikovs
starikovs / osx
Last active August 29, 2015 14:03
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
(the -w makes it permanent, i.e. it'll be reloaded when you reboot)
(How do you turn this off once it's started this way?)
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
--- home, end, page up, page down ---
Fn + left
Fn + right
@starikovs
starikovs / gist:4980295
Last active December 13, 2015 21:49
Small alt-checkbox.
<input type="checkbox" id="checkbox1">
<label for="checkbox1">Check Me! I'm small.</label>
<script>
jQuery("#checkbox1").altCheckbox({
outlineUnchecked: false,
sizeClass: "small"
});
</script>
@starikovs
starikovs / gist:4980428
Last active December 13, 2015 21:49
Medium alt-checkbox.
<input type="checkbox" id="checkbox2">
<label for="checkbox2">Check Me! I'm medium.</label>
<script>
jQuery("#checkbox2").altCheckbox({
// Some options can be placed here.
// Don't pass any options to use defaults.
});
</script>