Skip to content

Instantly share code, notes, and snippets.

View takeshiyako2's full-sized avatar

Takeshi Yako takeshiyako2

View GitHub Profile
@takeshiyako2
takeshiyako2 / eccube.conf
Created January 14, 2016 05:47
EC-CUBE3 nginx config
server {
listen 80;
root /var/www/eccube/html;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
error_page 500 502 503 504 /50x.html;
@takeshiyako2
takeshiyako2 / 017_historia.conf
Last active January 20, 2016 05:40
nginx ssl settings sample for A++
server {
listen 443;
server_name historia.hitokoto.co;
root /var/www/historia;
index index.php;
charset utf-8;
gzip on;
gzip_types text/css text/javascript application/json;
ssl on;
@takeshiyako2
takeshiyako2 / td-agent.conf
Created July 27, 2016 06:14
fluent-plugin-google-cloud-storage-out config sample
# tail
<source>
type tail
format /^(?<date>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3}) (?<status>\S+) \[(?<role>\S+)\] (?<info>.*)$/
path /tmp/application.log
pos_file /var/log/td-agent/myapp.application.pos
tag td.myapp.application
</source>
<match td.myapp.application>
@takeshiyako2
takeshiyako2 / renew_ip_address_test.xml
Created August 25, 2016 06:42
Change Route53 IP address by dnscurl.pl
<?xml version="1.0" encoding="UTF-8"?>
<ChangeResourceRecordSetsRequest xmlns="https://route53.amazonaws.com/doc/2013-04-01/">
<ChangeBatch>
<Changes>
<Change>
<Action>DELETE</Action>
<ResourceRecordSet>
<Name>test.hitokoto.co.</Name>
<Type>A</Type>
<TTL>300</TTL>
@takeshiyako2
takeshiyako2 / AndroidManifest.xml
Last active February 1, 2017 05:54
Android AdMob
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.admob.com.admobempty">
<!-- Include required permissions for Google Mobile Ads to run-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:allowBackup="true"
@takeshiyako2
takeshiyako2 / MainActivity.java
Last active February 1, 2017 05:58
Android List AutoScroll Sample
package app.sample.listautoscroll;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AbsListView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
@takeshiyako2
takeshiyako2 / Info.plist
Last active February 7, 2017 02:03
iOS Objective-C against kCFStreamErrorDomainSSL error
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>mydomain.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
@takeshiyako2
takeshiyako2 / default.conf
Last active August 3, 2017 19:55
WordPress + Varnish (Varnish port 80 -> nginx port 8080 -> php-fpm)
# /etc/nginx/conf.d/default.conf
server {
listen 8080;
server_name localhost;
root /usr/share/nginx/wordpress;
index index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#/usr/lib/nagios/plugins/check_domain
#nagios plugins
#original:
#http://exchange.nagios.org/directory/Plugins/Internet-Domains-and-WHOIS/check_domain/details
#
#this plugins can check
# example.co.jp (level 3 domain)
# example.jp (level 2 domain)
#
#usage:
@takeshiyako2
takeshiyako2 / MainActivity.java
Created July 31, 2015 01:44
Android Sample Open Facebook Page
package facebook.page.test;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;