Skip to content

Instantly share code, notes, and snippets.

View hissy's full-sized avatar
💭
😄

Takuro Hishikawa hissy

💭
😄
View GitHub Profile
@tao-s
tao-s / get_updated_stack_pages.php
Last active March 24, 2016 21:08
concrete5 5.7系で、更新されたスタックとグローバルエリアが利用されているページのcID一覧を取得するJobのサンプルコード
<?php
namespace Application\Job;
use Concrete\Core\Cache\Cache;
use Config;
use Job as AbstractJob;
use Core;
use Database;
use PermissionKey;
@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 July 3, 2024 02:22
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 May 26, 2024 20:03
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 );