Skip to content

Instantly share code, notes, and snippets.

@nikneroz
nikneroz / com.example.invoker.plist
Created October 27, 2015 13:40
Invoker plist file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>invoker</string>
<key>ProgramArguments</key>
<array>
<string>bash</string>
@nikneroz
nikneroz / config.fish
Last active May 14, 2017 13:04
Fish git prompt
set normal (set_color normal)
set magenta (set_color magenta)
set yellow (set_color yellow)
set green (set_color green)
set red (set_color red)
set gray (set_color -o black)
# Fish git prompt
set __fish_git_prompt_showdirtystate 'yes'
set __fish_git_prompt_showstashstate 'yes'
@nikneroz
nikneroz / Tutorial.md
Created July 20, 2017 13:56
Elixir + Phoenix Framework 1.3 + Sentinel. This is tutorial and step by step installation guide.

Phoenix Framework 1.3 + Sentinel

Preparing environment

We need to generate secret key for development environment.

mix phoenix.gen.secret
# ednkXywWll1d2svDEpbA39R5kfkc9l96j0+u7A8MgKM+pbwbeDsuYB8MP2WUW1hf
@nikneroz
nikneroz / Guardian JWT.md
Last active July 31, 2017 22:26
Elixir + Phoenix Framework 1.3 + Guardian + JWT. This is tutorial and step by step installation guide.

Elixir + Phoenix Framework 1.3 + Guardian + JWT + Comeonin

User model bootstrap

Let's generate User model and controller.

mix ecto.create
mix phoenix.gen.json Accounts User users email:string name:string phone:string password_hash:string is_admin:boolean
@nikneroz
nikneroz / File Upload(S3).md
Created August 2, 2017 15:04
Elixir + Phoenix Framework 1.3 + FIle upload + S3 upload

@nikneroz
nikneroz / init.vim
Last active August 21, 2017 20:48
Neovim & MacVim & Gvim
if &compatible
set nocompatible
endif
" Required:
set runtimepath+=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim
set runtimepath+=~/.config/nvim/dein/.cache/vim-airline/
set clipboard=unnamed
" Required:
@nikneroz
nikneroz / docs.md
Created September 5, 2017 13:00
Mixfit API docs

MixFit prototype API

MixFit prototype API

Version: 1.0.0

/api/v1/me/{public-address}


GET

Summary: returns BioCoin balance and reward amount

@nikneroz
nikneroz / hound.ex
Last active January 15, 2018 16:20
Use Hound for site scrapping
config :hound, [driver: "chrome_driver"]
session = Hound.start_session()
navigate_to("https://hello.world")
:timer.sleep(7 * 1000)
json_tag = find_element(:tag, "pre")
json = inner_html(json_tag)
Hound.end_session(session)
@nikneroz
nikneroz / es6_overview.md
Last active March 13, 2018 10:15
ES6 overview

ES6

В ECMAScript поддерживаются пять примитивных типов данных:

  • Number
  • String
  • Boolean
  • Null
  • Undefined
  • Object
@nikneroz
nikneroz / win_init.vim
Last active July 8, 2018 18:03
Neovim & Windows WLS
if &compatible
set nocompatible
endif
" Required:
set runtimepath+=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim
set runtimepath+=~/.config/nvim/dein/.cache/vim-airline/
set clipboard=unnamed
" Required: