公式からOSに合わせたDockerをダウンロードする
$ docker --help
<?php | |
/** | |
* | |
* 当然そのまま。型が異なっててもそのまま。 | |
* | |
*/ | |
$arr = array(1, 2, 3); | |
$casted = (array) $arr; | |
var_dump($casted); |
<?php | |
class CalcTest extends PHPUnit_Framework_TestCase { | |
public function __construct() { | |
$this->hoge = 'hogehoge'; | |
} | |
private $_hoge; |
#!/usr/bin/env bash | |
# ---------------------------------------- | |
# config | |
# | |
PRIVATE_NETWORK_IP="192.168.1.160" | |
PRIVATE_NETWORK_GW="192.168.1.1" | |
MYSQL_PASSWORD="mysqlpswd"; |
# ブラウザを起動する | |
# driver = Selenium::WebDriver.for :firefox | |
# Firefoxでダウンロードのリンクを踏んだとき保存確認ダイアログを出さずに指定のフォルダに保存 | |
profile = Selenium::WebDriver::Firefox::Profile.new | |
profile['browser.download.folderList'] = 2 | |
profile['browser.download.useDownloadDir'] = true | |
profile['browser.download.dir'] = '/path/to/download/dir' | |
profile['browser.helperApps.neverAsk.saveToDisk'] = 'text/plane,text/csv,application/x-ofx,text/comma-separated-values,application/octet-stream,application/vnd.ms-excel' | |
profile['browser.helperApps.alwaysAsk.force'] = false |
// Materialのtransparentが有効になっていないとopacityを設定しても反映されない | |
var mesh = new THREE.Mesh( | |
new THREE.SphereGeometry( 30, 30, 30 ), | |
new THREE.MeshBasicMaterial({color:0x00ff00, transparent:true, opacity:0.5}) | |
); |
#!/bin/bash | |
URLS=("http://www.stevensegallery.com" "http://www.placecage.com" "http://placekitten.com") | |
DIR="." | |
# ---------------------------------------- |
function inherit(sub, sup) { | |
if (Object.setPrototypeOf) { | |
Object.setPrototypeOf(sub.prototype, sup.prototype); | |
} else if (Object.create) { | |
sub.prototype = Object.create(sup.prototype); | |
sub.prototype.constructor = sub; | |
} else { | |
sub.super_ = sup; | |
var F = function F() {}; | |
F.prototype = sup.prototype; |
(function(){ | |
var text = 'F1ドライバーのロズベルグ選手は、所属するメルセデスチームとの契約をカリブ海の英領バージン諸島にある企業を介して行っていることが判明。'; | |
var canvas, context; | |
canvas = document.createElement('canvas'); | |
canvas.width = 512; | |
canvas.height = 256; |
公式からOSに合わせたDockerをダウンロードする
$ docker --help
<?php | |
for ($i = 1; $i <= 12; $i++) { | |
echo '先月:' . date('Y-m-t', strtotime(date("Y-$i-01") . '-1 month')) . "\n"; | |
echo '当月:' . date('Y-m-t', strtotime(date("Y-$i-01"))) . "\n"; | |
echo '来月:' . date('Y-m-t', strtotime(date("Y-$i-01") . '+1 month')) . "\n"; | |
echo "\n"; | |
} |