- Generates string representation of this object
- @returns Combination displayName and instanceCount
This file contains 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
class User < ActiveRecord::Base | |
define_index do | |
set_property enable_star: true | |
indexes :name | |
indexes :phone | |
indexes :address | |
end | |
def self.query(options) |
This file contains 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
let os = substitute(system('uname'), "\n", "", "") | |
if os == "Darwin" | |
vmap <C-c> y:call system("pbcopy", getreg("\""))<CR>:echo "copied to system clipboard"<CR> | |
nmap <C-v> :call setreg("\"", system("pbpaste"))<CR>p:echo ""<CR> | |
end |
This file contains 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
augroup CrossHair | |
au! | |
au VimEnter * setlocal cursorline | |
au WinEnter * setlocal cursorline | |
au BufWinEnter * setlocal cursorline | |
au WinLeave * setlocal nocursorline | |
au VimEnter * setlocal cursorcolumn | |
au WinEnter * setlocal cursorcolumn | |
au BufWinEnter * setlocal cursorcolumn |
This file contains 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
import argparse | |
from yaml import load, dump, add_representer | |
try: | |
from yaml import CDumper as Dumper | |
except ImportError: | |
from yaml import Dumper | |
def rep(dumper, data): | |
return dumper.represent_scalar('tag:yaml.org,2002:str', data, style=None) |
This file contains 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
ag "sometext" --nogroup | awk '{print substr($1,1,index($1,":")-1);}' | xargs -I {} sed -i .bak -e 's/sometext/anothertext/g' {} |
This file contains 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
unbind C-b | |
set -g prefix C-a | |
bind C-a send-prefix | |
set-window-option -g mode-keys vi | |
set -g mode-mouse off | |
set -g mouse-select-pane off | |
set -g mouse-resize-pane off | |
set -g mouse-select-window off | |
set-option -g default-command "reattach-to-user-namespace -l bash" |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script type="text/javascript"> | |
function add(){ | |
for (var i = 0; i < 500; i++) { | |
$('<div style="background-color: #A68585;margin: 2px 0;width: 100px;height: 30px;">' + i + '</div>').appendTo('.box'); | |
} | |
} |
This file contains 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(buster, when, apply) { | |
var assert, refute, fail, sentinel; | |
assert = buster.assert; | |
refute = buster.refute; | |
fail = buster.assertions.fail; | |
sentinel = {}; |
This file contains 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
module.exports = function(grunt) { | |
grunt.registerTask("doxer", "Generate docs", function() { | |
grunt.log.writeln("generator: " + this.generator); // <-- this.generator is undefined | |
}); | |
}; |