Skip to content

Instantly share code, notes, and snippets.

View hissy's full-sized avatar
💭
😄

Takuro Hishikawa hissy

💭
😄
View GitHub Profile
@joglomedia
joglomedia / mautic.dev.conf (Mautic Nginx Configuration)
Last active January 26, 2021 06:16
Mautic Nginx Config (Install using Simple LNMP Installer - https://github.com/joglomedia/deploy) - Open Source Marketing Automation
server {
listen 80;
#listen [::]:80 default_server ipv6only=on;
## Make site accessible from world web.
server_name mautic.dev www.mautic.dev *.mautic.dev;
## Log Settings.
access_log /var/log/nginx/mautic.dev_access.log;
error_log /var/log/nginx/mautic.dev_error.log error;
@katzueno
katzueno / .htaccess
Last active January 30, 2018 00:27 — forked from hissy/.htaccess
Whitelisting IP for concrete5 dashboard / IP アドレス制限
## -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Change RewriteBase path if this concrete5 is installed on subdirectory / concrete5 がサブディレクトリにインストールされていたら、RewriteBase の変更が必要です。
# IP address restriction starts here / IP アドレス制限、アクセス許可するのIPの設定
RewriteCond %{REMOTE_ADDR} !123\.4\.56\.789
RewriteCond %{REMOTE_ADDR} !123\.123\.123\.123
# Add more lines is you have more IP / もっとIPがある場合は、行を追加してください
@dragonjet
dragonjet / 1-server.md
Last active July 31, 2021 21:01
Setup Web Server on EC2 Amazon Linux AMI

Step 1: Server Credentials

This assumes you are now connected to the server via SSH.

  • sudo -s Enter root mode for admin access
  • groupadd devgroup Create new group to be later granted access to /var/www/html

Creating a new Root User

  • useradd -G root,devgroup masterdev Create new root user. Also add to the devgroup
  • passwd masterdev Change password for the new root user
  • At this point, you'll need to input your new root user's new password
@certainlyakey
certainlyakey / rscsvimporter_replace_save_post.php
Last active August 29, 2015 14:05
Wordpress - import post connections from CSV file (with RS CSV Importer and Posts 2 Posts plugins)
<?php
/*
Plugin Name: Replace save_post method of Really Simple CSV Importer (customized)
Description: This is an example add-on.
Author: Takuro Hishikawa,
Version: 0.2
*/
class rscsvimporter_replace_save_post {
// singleton instance
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active April 2, 2024 14:57
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook

BASE API v1 ドキュメント (β版)

BASEのAPIの開発者向けのドキュメントです。

概要

このAPIを使うと、あなたのアプリケーションとBASEを連携させることができます。

例えば

  • BASEのアカウントでログインする
  • BASEのショップの商品情報を取得する
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@mezis
mezis / query_finder.sql
Last active April 28, 2022 15:17
Finding long-running queries in MySQL
SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120)
FROM information_schema.processlist
WHERE command <> 'Sleep'
AND info NOT LIKE '%PROCESSLIST%'
ORDER BY time DESC LIMIT 50;
@miya0001
miya0001 / gist:7840745
Last active December 30, 2015 14:09
WordPressに独自のURLこの例では、/json/を追加する際のサンプル。 プラグインの無効化時にルールをキャッシュから削除 & 他のプラグインや管理者の操作によってflush_rewrite_rules()が発火した際に再登録を行う。
<?php
// プラグインの有効化時/無効化時の処理を登録
register_activation_hook( __FILE__ , 'my_activation_callback' );
register_deactivation_hook( __FILE__ , 'my_deactivation_callback' );
// 他のプラグインや管理者の操作によってflush_rewrite_rules()が発火した際にこのプラグイン用のrewrite ruleを再登録する
add_action( 'delete_option', 'my_delete_option', 10, 1 );
@tenman
tenman / gist:6373691
Created August 29, 2013 02:37
このファイルは、個別のテーマやプラグインファイルの簡単な検査と、それぞれのファイルで使用されているMD5_FILEの値を計算し配列として表示します。 表示された配列を、テーマやプラグインディレクトリに、check-same.phpという名前で表示すると、次回から現在のMD5_FILEと記録されたMD5_FILEと比較して、ファイルに変更があったかどうかを表示する事が出来ます。
<?php
/*
File Name: detect-bom.php
Description: WordPressのインストールディレクトリに配置する事で、テーマ、プラグインの簡易的な検査と、それぞれのテーマやテンプレートファイルで使われているファイルのMD5_FILEを、表示します。テーマやプラグインのルートディレクトリにcheck-same.phpとして表示された配列をphpとしてペーストしておくと、次回の検査で、check-same.php配置後に変更されたテーマやテンプレートの同一性をチェックする事ができます。
Author: Tenman
Author URI: http://www.tenman.info/
Version: 0.1
License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/