Skip to content

Instantly share code, notes, and snippets.

View felixexter's full-sized avatar

Felix Exter felixexter

View GitHub Profile
@felixexter
felixexter / manifest.json
Last active August 29, 2015 14:04
host2image
{
"name": "host2image",
"description": "Редирект с хостинга с рекламой на картинку.",
"author": "felixexter",
"version": "2.0",
"content_scripts": [{
"all_frames": false,
"js": [ "script.js" ],
"matches": [ "http://*/*", "https://*/*" ],
"run_at": "document_end"
@felixexter
felixexter / killbydir.sh
Created August 5, 2015 09:20
killbydir
#!/bin/bash
# add to /usr/local/bin/killbydir
# chmod +x /usr/local/bin/killbydir
path=`pwd`
for process in `pgrep $1`; do
foo=(`pwdx $process`)
if [ ${foo[1]} = $path ]; then
pid=${foo[0]::-1}
`kill -9 $pid`
fi
@felixexter
felixexter / # Sublime Emmet JSX Reactjs.md
Last active August 29, 2015 14:27 — forked from max-mykhailenko/# Sublime Emmet JSX Reactjs.md
Sublime text 3. Enable Emmet in JSX files with Sublime React plugin

Problem

  • Using emmet in jsx files
  • Emmet expands text when js autocomplete needed
  • Using className instead of class

How it works

  • Install plugin RegReplace
  • Install plugin Chain Of Command
@felixexter
felixexter / better-nodejs-require-paths.md
Created January 26, 2016 10:11 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@felixexter
felixexter / Readme.md
Created May 11, 2016 05:45 — forked from mxstbr/Readme.md
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@felixexter
felixexter / .profile
Last active May 14, 2016 09:44
Git Alias
# Отображение текущего состояния.
alias gs='git status '
# Отображение коммитов с коротким названием, датой, комментарием и автором.
alias gl='git --no-pager log --pretty=format:"%h | %ad | %s%d [%an]" --graph --date=short'
alias glo=gl
alias glog=gl
# Добавление всех файлов с учётом удалённых и отображение текущего состояния.
alias gall='git add --all && git status'
@felixexter
felixexter / reactjs.md
Last active September 15, 2016 09:30
React.js

# React.js