This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| moradi: | |
| name: 莫兰迪 | |
| author: eddix | |
| horizontal: true | |
| candidate_format: "%c\u2005%@" | |
| font_point: 16 | |
| label_font_point: 14 | |
| corner_radius: 5 | |
| line_spacing: 10 | |
| back_color: '0xa79686' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/env python | |
| from collections import defaultdict | |
| from random import randint | |
| def mute(number, plane): | |
| """ | |
| mute invalid number | |
| """ | |
| muted = set() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function toon { | |
| echo -n "" | |
| } | |
| get_git_dirty() { | |
| git diff --quiet || echo '*' | |
| } | |
| autoload -Uz vcs_info | |
| #autoload -U colors && colors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " .vimrc by eddix | |
| " $ git clone http://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
| " $ PluginInstall | |
| if has("gui_macvim") | |
| " cancel default hot-key | |
| let macvim_skip_cmd_opt_movement = 1 | |
| let macvim_hig_shift_movement = 1 | |
| set transparency=2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # autoload concerns | |
| module YourApp | |
| class Application < Rails::Application | |
| config.autoload_paths += %W( | |
| #{config.root}/app/controllers/concerns | |
| #{config.root}/app/models/concerns | |
| ) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream mostor_backend { | |
| server unix:/tmp/unicorn.mostor-website.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| root /home/work/www/mostor/current/public/; | |
| client_max_body_size 1000m; | |
| location ^~ /assets/ { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* app_path | |
| * | |
| * get application path, it need argv[0], and store the result to path. | |
| * | |
| * */ | |
| char * app_path(char * path, const char * argv0) | |
| { | |
| char buf[PATH_MAX]; | |
| char * pos; | |
| if (argv0[0] == '/') { // run with absolute path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Lua Object Prototype | |
| Robot = {name = "Eddix", id = 001} | |
| function Robot:new() | |
| self.__index = self | |
| local t = setmetatable({}, self) | |
| return t | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if current_user.update_with_password({:current_password => params[:current_password], :password => params[:password]}) | |
| current_user.reset_authentication_token! | |
| present current_user, :with => APIEntities::User | |
| else | |
| present current_user, :with => APIEntities::UserError | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # config/initializers/form_builder.rb | |
| class ActionView::Helpers::FormBuilder | |
| alias :origin_label :label | |
| def label(method, content_or_options = nil, options = nil, &block) | |
| if content_or_options && content_or_options.class == Hash | |
| options = content_or_options | |
| else | |
| content = content_or_options |
NewerOlder