Put aliases.fish
, config.fish
to ~/.config/fish/
Put fish_prompt.fish
, fish_right_prompt.fish
, fish_title.fish
to ~/.config/fish/functions/
defmodule Params do | |
@moduledoc """ | |
Provides Ecto.Schema for params parsing. | |
Example: | |
defmodule SearchParams do | |
use Params | |
params do | |
field(:text, :string) | |
field(:user_id, :integer) | |
field(:team_ids, {:array, :integer}) |
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: bitwalker/alpine-elixir-phoenix:1.5.2 | |
- image: postgres:9.4.1 | |
environment: | |
POSTGRES_USER: ubuntu | |
working_directory: ~/repo | |
steps: |
function circle | |
set -l project (git config --get remote.origin.url | sed "s/.*:\(.*\).git/\1/") | |
if test -n $project | |
set -l git_branch (git symbolic-ref HEAD 2> /dev/null | sed -e 's/refs\/heads\///') | |
set -l url "https://circleci.com/gh/$project/tree/$git_branch" | |
open $url | |
end | |
end |
" About: | |
" | |
" How often do you forget which keys you should use to select/modify strings | |
" in the ' or " or in other pairs? I often use viw/ciw instead of vi'/vi" for | |
" the first time because it easier for my fingers (but after that I remember | |
" about vi'). This script allows you always use the same shortcut for all | |
" cases. When you want to select string in the ' use viv. Do you want to | |
" select all in the '()'? Use viv. All in the '[]'? Use viv. | |
" | |
" How it works: |
RBENV:
install_git 1.9.3-p194-price-fast-require https://github.com/gnprice/ruby fast-require-1.9.3p194 autoconf standard
Run rbenv install /path/to/fast-require
Comment lines 60-62 (hide psych warning) ~/.rbenv/versions/fast-require/lib/ruby/1.9.1/yaml.rb
d = Hash.new { |h, k| h[k] = Hash.new(&h.default_proc) } | |
d[:a][:b][:c][:d][:e] = 1 | |
puts d |
[4/6/12 5:24:04 PM] ziryanov.ivan | |
мне надо строку типа "SepiaTone" сделать "Sepia Tone" | |
как это регуляркой сделать? | |
[4/6/12 5:29:04 PM] Alexander Gorkunov: | |
вот так на js "SepiaTone".replace(/([A-Z][a-z]+)/g, "$1 ") | |
ну можно еще trim сделать в конце | |
[4/6/12 5:40:53 PM] ziryanov.ivan: | |
вот так это получилось на обжектив си) |
var appFolder = process.argv[2]; | |
var prefix = process.argv[3]; | |
var idle = false; | |
//emulate several browser objects for correct loading ext-core | |
navigator = { | |
userAgent: 'nodejs', | |
platform: 'linux' | |
}; | |
document = { | |
getElementsByTagName: function(tag) { |
//add set default xtype preprocessor | |
Ext.Class.registerPreprocessor('default_xtype', function(cls, data) { | |
var className = data.$className; | |
var re = new RegExp(/^cl.view./); | |
if (re.test(className) && !data.alias) { | |
data.alias = 'widget.' + className.replace(re, '').replace(/\./g, '_').toLowerCase(); | |
/* | |
* Overide default initComponent for defining component config by cloning | |
* this section from component class body (componentConfig property). | |
* WARNING: you can define component configuration in class body but this configuration |