Skip to content

Instantly share code, notes, and snippets.


Takuro Hishikawa hissy

View GitHub Profile
MOYORi / fizzbuzz.php
Last active Jul 3, 2019 — forked from hissy/fizzbuzz.php
FizzBuzz for PHP 出題ファイル
View fizzbuzz.php
* FizzBuzz 問題
* * 3で割り切れる場合は Fizz と出力
* * 5で割り切れる場合は Buzz と出力
* * 3でも5でも割り切れる場合は Fizz Buzz と出力する
* Fork ボタンでフォークして作業開始
* スクリプトの実行方法 $ php fizzbuzz.php
# Creator: Phil Cook
# Modified: Andy Miller
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
brew_array=("5.5","5.6","7.0","7.1","7.2", "7.3")
php_array=("php@5.5" "php@5.6" "php@7.0" "php@7.1" "php@7.2" "php@7.3")
valet_support_php_version_array=("php@5.5" "php@5.6" "php@7.0" "php@7.1" "php@7.2" "php@7.3")
View c5.api.postman.json
"info": {
"_postman_id": "e3ad840b-0fe8-42d2-976c-af3cbbb4d083",
"name": "c5 API",
"description": "concrete5's built in API",
"schema": ""
"item": [
"name": "oauth",
bgarrant /
Last active Jun 20, 2020
How to Switch PHP Version in Laravel Valet between PHP 7.1 and PHP 5.6

How to Switch PHP Version in Laravel Valet between PHP 7.1 and PHP 5.6

Valet switch PHP version with these commands

Install PHP 5.6 and switch Valet to PHP 5.6

valet stop
brew unlink php71
brew install php56
brew install php56-mcrypt
adamwathan /
Last active Jan 2, 2020
Troubleshooting Valet on macOS Sierra

Troubleshooting Valet on Sierra

Common Problems

Problem: I just see "It works!"

Apache is running on port 80 and interfering with Valet.

  1. Stop Apache: sudo /usr/sbin/apachectl stop
  2. Restart Valet: valet restart
CAWeissen / rscsv-p2p-plugin.php
Last active Jul 16, 2016
This plugin allows Posts 2 Posts connections to be created and imported using Really Simple CSV Importer. This WordPress plugin requires Really Simple CSV Importer ( and Posts 2 Posts (
View rscsv-p2p-plugin.php
Plugin Name: RSCSV/Posts 2 Posts
Description: Connect imported posts using Posts 2 Posts connections
Author: Chris Weissenberger, Aleksandr Beliaev
Version: 1.3
add_filter('really_simple_csv_importer_post_saved', function($post) {
if (is_object($post)) {
tao-s / get_updated_stack_pages.php
Last active Mar 24, 2016
concrete5 5.7系で、更新されたスタックとグローバルエリアが利用されているページのcID一覧を取得するJobのサンプルコード
View get_updated_stack_pages.php
namespace Application\Job;
use Concrete\Core\Cache\Cache;
use Config;
use Job as AbstractJob;
use Core;
use Database;
use PermissionKey;
joglomedia / (Mautic Nginx Configuration)
Last active Feb 11, 2020
Mautic Nginx Config (Install using Simple LNMP Installer - - Open Source Marketing Automation
View (Mautic Nginx Configuration)
server {
listen 80;
#listen [::]:80 default_server ipv6only=on;
## Make site accessible from world web.
server_name *;
## Log Settings.
access_log /var/log/nginx/mautic.dev_access.log;
error_log /var/log/nginx/mautic.dev_error.log error;
katzueno / .htaccess
Last active Jan 30, 2018 — forked from hissy/.htaccess
Whitelisting IP for concrete5 dashboard / IP アドレス制限
View .htaccess
## -- 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 /
Last active Apr 16, 2020
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
You can’t perform that action at this time.