Skip to content

Instantly share code, notes, and snippets.

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

Viacheslav Starikov starikovs

👨‍💻
Coding
View GitHub Profile
rm -rf ~/.atom
rm -rf /usr/local/bin/atom
rm -rf /usr/local/bin/apm
rm -rf /Applications/Atom.app
rm -rf ~/Library/Preferences/com.github.atom.plist
rm -rf ~/"Library/Application Support/com.github.atom.ShipIt"
rm -rf ~/"Library/Application Support/Atom"
rm -rf ~/"Library/Saved Application State/com.github.atom.savedState"
rm -rf ~/Library/Caches/com.github.atom
rm -rf ~/Library/Caches/com.github.atom.Shipit
@starikovs
starikovs / Handlebars_backbone.html
Last active April 13, 2016 19:34
Webpack for Backbone.js
<script id="some-template" type="text/x-handlebars-template">
<input value="{{name}}">
</script>
<script>
// Inside view
const Hello = Backbone.View.extend({
el: '#hello-container',
template: Handlebars.compile($('#input-template').html()),
@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 / 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 ---
--- 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 / 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 ---
@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
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
--- 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)
--- cwd Projects/long-dialog ---
:CtrlP
:CtrlP site
-- when CtrlP is open ---
F5 - cache
c-f - forward
c-b - back
c-d - path/file