Skip to content

Instantly share code, notes, and snippets.

View KEINOS's full-sized avatar

KEINOS KEINOS

View GitHub Profile
@KEINOS
KEINOS / class.cData.php
Last active October 23, 2016 09:17
SQLite3を使ったデータ保存クラス(SQLite2互換)
<?php
/**
* *********************************************************
* KEINOS Data engine class extended SQLite3 version
* *********************************************************
* 最新版
* https://gist.githubusercontent.com/KEINOS/05f43c81edff366b6e9b9e627a36eb6a/raw/class.cData.php
*/
@KEINOS
KEINOS / Youtube IFrame API sample
Last active November 3, 2016 19:13
YouTube IFrame APIで再生リストの埋め込みiframe内の動画のURLを取得するサンプル。 http://d.hatena.ne.jp/KEINOS/20161103 用のサンプルコードです。
<!DOCTYPE html>
<html>
<body>
<!-- 1. 下記<div>タグが<iframe> (とビデオ・プレーヤー)に置き換わります。 -->
<h3>YouTube Play List</h3>
<div id="player"></div>
<!-- 動画が次へ移るとonPlayerStateChange関数により<div>タグ内の情報も更新されます -->
<h3>Current URL of Video</h3>
<div id="video_url"></div>
@KEINOS
KEINOS / reset.css
Last active November 5, 2016 23:27
CSS Reset for HTML5 by Richard Clard
/*
html5doctor.com Reset Stylesheet
v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com
Twitter: @rich_clark
Original Author: Eric Meyer's CSS reset - http://meyerweb.com
** How to use:
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/KEINOS/c90c22e7ee166b9c797acefd33e5ccfb/raw/reset.css">
@KEINOS
KEINOS / 1.VBS samples for Wine@Wineskin.md
Last active December 7, 2016 01:19
List of VBScript samples for WSH that worked in Wine @ Wineskin Winery

List

WSH Scripts below worked with Wine @ Wineskin winery.

  • Echo.vbs
  • Open_notepad.vbs
  • ReadFileAndConvertStrToUppercase.vbs

Reference

@KEINOS
KEINOS / 1.GrovePi+ サンプルコードの和訳.md
Last active December 8, 2016 05:27
SEEED STUDIOのGrovePi用のサンプルコードを和訳したGist一覧です。
@KEINOS
KEINOS / YoutubeLiveStreamingRasPiCamera2.sh
Created December 9, 2016 06:20
Raspberry Pi3 Model B と RasPi公式カメラモジュール V.2を使ってYoutube のストリーミング配信をするシェル・スクリプト
#!/bin/sh
#
# Check your ServerURL and Stream key at:
# https://www.youtube.com/live_dashboard
# and overwrite <ServerURL> and <YourStreamKey> below.
raspivid -o - -w 1920 -h 1080 -t 0 -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv <ServerURL>/<YourStreamKey>
# Loop to keep the script run
while true
@KEINOS
KEINOS / .htaccess - markdown
Last active December 12, 2016 19:48
htaccess sample of adding content type "text/markdown" to associate file extension ".md" that calls specific php file.
AddType text/markdown md
Action text/markdown /path/to/markdown.php
<?php
/* =======================================================================
Markdown記法(.md)ファイルをHTML記法に変換するスクリプト
拡張子.mdの場合、このファイルを開くようにhtaccessで定義。環境変数($_SERVER)情報より
該当mdファイルを参照し、Parsedownクラスを使ってHTML形式に変換を行う。
Parsedown : http://parsedown.org/
・ 詳細  : https://blog.keinos.com/20161213_1906
・ 参照元 : http://blog.fenrir-inc.com/jp/2012/05/github_markdown.html
@KEINOS
KEINOS / fArray_merge.php
Last active May 29, 2017 21:42
PHPで添え字付き多次元配列を結合するための関数
<?php
function fArray_merge($aOld, $aNew)
{
if (is_array($aOld)) {
if (is_array($aNew)) {
foreach ($aNew as $sKey => $mValue) {
if (isset($aOld[$sKey]) && is_array($mValue) && is_array($aOld[$sKey])) {
$aOld[$sKey] = fArray_merge($aOld[$sKey], $mValue);
} else {
$aOld[$sKey] = $mValue;
@KEINOS
KEINOS / log_error_minecraft_launcher-helper_20170603.log
Created June 3, 2017 12:59
Crash report (error log) of "Minecraft Launcher Helper" on macOS Sierra (OSX 10.12.5)
「launcher Helperの問題レポート」
「launcher Helperが予期しない理由で終了しました。」(Minecraft Launcher quit unexpectedly.)
-----
Process: launcher Helper [83464]
Path: /Applications/Minecraft.app/Contents/Frameworks/launcher Helper.app/Contents/MacOS/launcher Helper
Identifier: com.mojang.mclauncher.helper
Version: ???
Code Type: X86-64 (Native)
Parent Process: launcher [83459]
Responsible: launcher Helper [83464]