Add this function screen
in ~/.bashrc
to avoid error as below:
Cannot open your terminal '/dev/pts/0' - please check.
function screen() {
/usr/bin/script -q -c "/usr/bin/screen ${*}" /dev/null
}
alias qlook="qlmanage -p 2>/dev/null" |
#!/bin/bash | |
# git push to gerrit for current branch | |
branch_name=$(git symbolic-ref -q HEAD) | |
branch_name=${branch_name##refs/heads/} | |
branch_name=${branch_name:-HEAD} | |
git push origin HEAD:refs/for/$branch_name |
Add this function screen
in ~/.bashrc
to avoid error as below:
Cannot open your terminal '/dev/pts/0' - please check.
function screen() {
/usr/bin/script -q -c "/usr/bin/screen ${*}" /dev/null
}
// execute script inside iframe | |
$('#iframe', parent.document).height($(document.body).outerHeight()); |
# generate md5 hash of source string typed by user | |
echo -n 'source string:' | |
read str | |
echo -n $str | md5sum |
# simulate "wc -l" by sed | |
sed -n '$=' |
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<style> | |
#table{ | |
display:table; /* must be 'table' */ | |
} | |
#table-cell{ | |
position:relative; /* must be 'relative' */ | |
width:500px; /* must be assigned an absolute value */ |
# arg-1: filename pattern for "find" | |
# arg-2: content pattern for "grep" | |
# note: If filename pattern contains wildcard, it should be escaped. | |
# Or the matched files only in the current path will be the result. Other matched files | |
# will not be included in the result. | |
# ex: | |
# > findNgrep.sh \*.php test | |
# | |
find . -name "$1" -exec grep -wnH "$2" {} \; |
.git-prompt.sh
curl -L https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
$(__git_ps1)
in prompt in your shell configuration file (ex: ~/.bashrc
)# colors
MAGENTA="\[\033[0;35m\]"
YELLOW="\[\033[0;33m\]"
/* | |
A scss mixin that convert background images from original URL path to DataURI with IE6-8 fallback. | |
- Based on `compass/css3/images` | |
- Support 1-10 background image(s) as arguments of `background-image` in compass. | |
- Use class `lt-ie9` in `<html>` tag as `html5-boilerplate` to determine if current browser is IE6-8 or not. | |
- Image created by `linear-gradient` will be skipped. | |
# Example |