Skip to content

Instantly share code, notes, and snippets.

💭
😄

Takuro Hishikawa hissy

💭
😄
Block or report user

Report or block hissy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MOYORi
MOYORi / fizzbuzz.php
Last active Jul 3, 2019 — forked from hissy/fizzbuzz.php
FizzBuzz for PHP 出題ファイル
View fizzbuzz.php
<?php
/**
* FizzBuzz 問題
* * 3で割り切れる場合は Fizz と出力
* * 5で割り切れる場合は Buzz と出力
* * 3でも5でも割り切れる場合は Fizz Buzz と出力する
*
* Fork ボタンでフォークして作業開始
*
* スクリプトの実行方法 $ php fizzbuzz.php
View sphp.sh
#!/bin/bash
# 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")
php_installed_array=()
php_version="php@$1"
View c5.api.postman.json
{
"info": {
"_postman_id": "e3ad840b-0fe8-42d2-976c-af3cbbb4d083",
"name": "c5 API",
"description": "concrete5's built in API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "oauth",
@bgarrant
bgarrant / ValetSwitchPHP.md
Last active Nov 11, 2019
How to Switch PHP Version in Laravel Valet between PHP 7.1 and PHP 5.6
View ValetSwitchPHP.md

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
adamwathan / troubleshooting.md
Last active Oct 4, 2019
Troubleshooting Valet on macOS Sierra
View troubleshooting.md

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
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 (https://wordpress.org/plugins/really-simple-csv-importer/) and Posts 2 Posts (https://wordpress.org/support/view/plugin-reviews/posts-to-posts)
View rscsv-p2p-plugin.php
<?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
tao-s / get_updated_stack_pages.php
Last active Mar 24, 2016
concrete5 5.7系で、更新されたスタックとグローバルエリアが利用されているページのcID一覧を取得するJobのサンプルコード
View get_updated_stack_pages.php
<?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 Jul 26, 2018
Mautic Nginx Config (Install using Simple LNMP Installer - https://github.com/joglomedia/deploy) - Open Source Marketing Automation
View mautic.dev.conf (Mautic Nginx Configuration)
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 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
dragonjet / 1-server.md
Last active Oct 8, 2019
Setup Web Server on EC2 Amazon Linux AMI
View 1-server.md

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.