./configure \
--prefix=/usr \
--localstatedir=/var/lib/vim \
--with-features=huge \
--enable-gpm \
--enable-acl \
--with-x=yes \
--enable-gui=gtk2 \
--enable-multibyte \
zcat -f ./hoge.backup > /tmp/backup_hoge.sql
psql -f /tmp/backup_hoge.sql -d db_name
var xhr = new XMLHttpRequest();
var file;
xhr.open('GET', '/media/upload/order1.pdf');
xhr.onload = function(){
file = new Blob([xhr.response], {type: "application/pdf"});
}
xhr.send();
//post
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
#!/bin/bash | |
declare -A dict | |
python manage.py showmigrations | (while read line | |
do | |
has=`echo "$line" | grep -e "[ ]"` | |
if [[ $has ]]; then | |
has_grant=`echo "$line" | grep -e "grant"` | |
if [[ ! $has_grant ]]; then | |
dict["$key"]=`echo "$line" | sed -e "s/\[ \] //"` |
$ adb shell
root@generic_x86:/ # setprop net.dns1 8.8.8.8
root@generic_x86:/ # setprop net.dns2 8.8.4.4
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
mv /usr/local/var/postgres /usr/local/var/postgres954
brew update
brew upgrade postgresql
initdb /usr/local/var/postgres -E utf8
pg_upgrade -b /usr/local/Cellar/postgresql/9.5.4_1/bin -B /usr/local/Cellar/postgresql/9.6.1/bin -d /usr/local/var/postgres954 -D /usr/local/var/postgres
cp /usr/local/Cellar/postgresql/9.6.1/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
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 json | |
from django.views.generic import FormView, TemplateView | |
from django_cbv_utils.views import JSONResponseMixin | |
class GoogleChartMixin(object): | |
chart_type = 'ColumnChart' | |
header = None | |
options = None |
http://qiita.com/sheep6box/items/37fb63c41d93c088013a
$ sudo apt-get -y install libopencv-dev build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff4-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip
$ sudo apt-get -y install build-essential libopenexr-dev python-tk libtbb-dev libeigen3-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra default-jdk ant libvtk5-qt4-dev unzip
$ sudo apt-get -y install libdc1394-22-dev libdc1394-22 libdc1394-utils