Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View hissy's full-sized avatar
💭
😄

Takuro Hishikawa hissy

💭
😄
View GitHub Profile
@biplobice
biplobice / BatchProcessingCommand.php
Last active December 8, 2021 02:21
Concrete CMS Batch Processing Command
<?php
/**
* @author: Biplob Hossain <biplob.ice@gmail.com>
* @license MIT
*/
namespace BatchProcessing\Console\Command;
use Concrete\Core\Console\Command;
use Concrete\Core\Support\Facade\Facade;
@UdaraAlwis
UdaraAlwis / ScrapeOffFormSkeletonFromGoogleForms.cs
Last active February 6, 2023 13:05
Access your Google Forms page data from dotnet C#
// using HtmlAgilityPack;
// using Newtonsoft.Json.Linq;
private static async Task ScrapeOffFormSkeletonFromGoogleFormsAsync(string yourGoogleFormsUrl)
{
HtmlWeb web = new HtmlWeb();
var htmlDoc = await web.LoadFromWebAsync(yourGoogleFormsUrl);
var htmlNodes = htmlDoc.DocumentNode.SelectNodes("//script").Where(
x => x.GetAttributeValue("type", "").Equals("text/javascript") &&
@MOYORi
MOYORi / fizzbuzz.php
Last active July 3, 2019 07:46 — forked from hissy/fizzbuzz.php
FizzBuzz for PHP 出題ファイル
<?php
/**
* FizzBuzz 問題
* * 3で割り切れる場合は Fizz と出力
* * 5で割り切れる場合は Buzz と出力
* * 3でも5でも割り切れる場合は Fizz Buzz と出力する
*
* Fork ボタンでフォークして作業開始
*
* スクリプトの実行方法 $ php fizzbuzz.php
@biplobice
biplobice / sphp.sh
Last active January 9, 2019 11:58 — forked from rhukster/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"
{
"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",
@sakalauskas
sakalauskas / FontAwesome-v5.0.9-Free.json
Last active February 14, 2024 03:28
List of all Font Awesome 5 icons in JSON Cheetsheet
{
"fas fa-address-book","fas fa-address-card","fas fa-adjust","fas fa-align-center","fas fa-align-justify","fas fa-align-left","fas fa-align-right","fas fa-allergies","fas fa-ambulance","fas fa-american-sign-language-interpreting","fas fa-anchor","fas fa-angle-double-down","fas fa-angle-double-left","fas fa-angle-double-right","fas fa-angle-double-up","fas fa-angle-down","fas fa-angle-left","fas fa-angle-right","fas fa-angle-up","fas fa-archive","fas fa-arrow-alt-circle-down","fas fa-arrow-alt-circle-left","fas fa-arrow-alt-circle-right","fas fa-arrow-alt-circle-up","fas fa-arrow-circle-down","fas fa-arrow-circle-left","fas fa-arrow-circle-right","fas fa-arrow-circle-up","fas fa-arrow-down","fas fa-arrow-left","fas fa-arrow-right","fas fa-arrow-up","fas fa-arrows-alt","fas fa-arrows-alt-h","fas fa-arrows-alt-v","fas fa-assistive-listening-systems","fas fa-asterisk","fas fa-at","fas fa-audio-description","fas fa-backward","fas fa-balance-scale","fas fa-ban","fas fa-band-aid","fas fa-barcode","fas fa-bars",
@bgarrant
bgarrant / ValetSwitchPHP.md
Last active September 30, 2022 08:08
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
adamwathan / troubleshooting.md
Last active January 19, 2021 04:14
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
CAWeissen / rscsv-p2p-plugin.php
Last active July 16, 2016 23:14
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)
<?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 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;