This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Slim - a micro PHP 5 framework | |
* | |
* @author Josh Lockhart <[email protected]> | |
* @copyright 2011-2017 Josh Lockhart | |
* @link http://www.slimframework.com | |
* @license http://www.slimframework.com/license | |
* @version 2.6.3 | |
* @package Slim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Default configuration for Xhgui | |
*/ | |
return array( | |
'debug' => false, | |
'mode' => 'development', | |
// Can be either mongodb or file. | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
trait CastsValueObjects | |
{ | |
protected function castAttribute($key, $value) | |
{ | |
$castToClass = $this->getValueObjectCastType($key); | |
// no Value Object? simply pass this up to the parent | |
if (!$castToClass) { | |
return parent::castAttribute($key, $value); |

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ball = ['foo', 'bar', 'baz', 'qux']; | |
const roll = (ball) => ball[Math.floor(Math.random() * ball.length)]; | |
// console.log(`당첨자는 "${roll(ball)}" 님입니다. 축합니다.`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$id = $_GET['id'] ?? null; | |
$sql ="SELECT * FROM posts WHERE id = {$id}"; | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Code referenced from https://gist.github.com/Thinkscape/1965669 | |
if (!isset($argv[1])) { | |
echo "Usage: " . $argv[0] . " (number of iterations)\n"; | |
exit(1); | |
} | |
$tests = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -f ~/Library/KeyBindings/DefaultkeyBinding.dict ]; then | |
echo "~/Library/KeyBindings/DefaultkeyBinding.dict already exists" | |
exit -1 | |
fi | |
mkdir -p ~/Library/KeyBindings | |
cat << EOF > ~/Library/KeyBindings/DefaultkeyBinding.dict | |
{ | |
"₩" = ("insertText:", "\`"); |

This file has been truncated, but you can view the full file.