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
FACEBOOK_API_PICTURE_URL = "https://graph.facebook.com/#id#/picture/" | |
class util_fb: | |
def __init__(self, access_token=None): | |
self.access_token = access_token | |
self.user_agent = PROJECT_NAME + '/' + PROJECT_VERSION | |
self.error_code = 0 | |
self.message = "" | |
def get_people_picture(self, fb_id, width=200, height=200): |
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
IE, Firefoxの最新版だとクロスドメイン制約のため、S3からWEBフォントをダウンロードしようとするとエラーとなる。 | |
>> 対処方法 | |
bucket の [properties] - [Permissions] の [add cors configuration]に設定を追加 | |
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> #### ←ここに許可するドメインを追加 *はワイルドカードなので全許可 | |
<AllowedMethod>GET</AllowedMethod> |
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
1.<meta> viewportを除く | |
2..container クラスのwidth属性を統一して!importantを追加 | |
.container { | |
max-width: none !important; | |
width: 970px; | |
} | |
3..navbar を使っている場合は、colloapsing 属性を取り除く |
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
.rotate { | |
-webkit-transform: rotate(90deg); | |
-moz-transform: rotate(90deg); | |
-o-transform: rotate(90deg); | |
-ms-transform: rotate(90deg); | |
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); | |
transform: rotate(90deg); | |
} |
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
#============================================================================== | |
## | |
## OPENSSL Nginx (ubuntu) | |
## | |
#============================================================================== | |
####OpenSSL の設定(自己証明書生成) | |
mkdir /etc/nginx/conf | |
cd /usr/local/nginx/conf | |
#CSRの生成 |
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
#============================================================================== | |
## | |
## wget 使い方 | |
## | |
#============================================================================== | |
##### 再帰的ダウンロード | |
wget -r -k http://xxx.com | |
## HTML や CSS 中のリンクをローカルを指すように変更する | |
wget -k http://xxx.com |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>memcached</string> | |
<key>ProgramArguments</key> | |
<array> |
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
#============================================================================== | |
## | |
## Django S3 settings (ubuntu) | |
## | |
#============================================================================== | |
#### install boto using PYPI | |
sudo pip install boto | |
#### install django-storage for Django | |
pip install django-storages |
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
# 導入済み証明書確認 | |
keytool -v -list -keystore $JAVA_HOME/jre/lib/security/cacerts | |
パスワード:changeit | |
#証明書のインポート | |
keytool -import -alias joe -file jcertfile.cer | |
keytool -import -alias cacert -keystore $JAVA_HOME/jre/lib/security/cacerts -file dvint.crt | |
デフォルトキーストアの証明書一覧表示 | |
keytool -list -v -storepass changeit -keystore ¥ |
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
#============================================================================== | |
## | |
## locale setting (Ubuntu) | |
## | |
## | |
#============================================================================== | |
##### genarate locale | |
## the superuser | |
locale-gen ja_JP.UTF-8 | |
dpkg-reconfigure locales |
NewerOlder