Skip to content

Instantly share code, notes, and snippets.

View olegakbarov's full-sized avatar
🐢
Slow but inevitable

Oleg Akbarov olegakbarov

🐢
Slow but inevitable
View GitHub Profile
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
// наивная реализация выглядит вот так:
function Inherit(object, parent) {
for (var key in parent) {
object[key] = parent[key]
}
}
/*
для любого sum(1)(2)(3)...(n) == m
*/
/**
~ hit this commands after you spinned new Droplet(with Dokku) on Digital Ocean
~ you can use any name instead of `dokku` (but you probably should not)
*/
git remote add dokku dokku@dokku_server_domain:app_name
git push dokku master
var curry = function (fn) {
var slice = [].slice,
args = slice.call(arguments, 1);
return function () {
return fn.apply(this, args.concat(slice.call(arguments)));
};
};
[[ -s ~/.bashrc ]] && source ~/.bashrc
@olegakbarov
olegakbarov / eslint
Created June 3, 2015 15:56
yolo eslint
{
"plugins": [
"react"
],
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@olegakbarov
olegakbarov / mongorc.js
Created July 9, 2015 12:36
prettify mongo shell
DBQuery.prototype._prettyShell = true
@olegakbarov
olegakbarov / gist:77f03d141fb8ba5054c4
Last active June 14, 2016 16:34
bash superpowers

Basic moves

  • Move back one character. Ctrl + b
  • Move forward one character. Ctrl + f
  • Delete current character. Ctrl + d
  • Delete previous character. Backspace
  • Undo. Ctrl + -

Moving faster

@olegakbarov
olegakbarov / INSTALLATION.md
Last active July 10, 2020 18:27 — forked from DenisIzmaylov/INSTALLATION.md
OS X 10.11 El Capitan: clean install

OS X 10.11 (El Capitan) / Node.js Developer Environment

Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.

Content