This file contains hidden or 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
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; |
This file contains hidden or 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 | |
URLS=("http://www.stevensegallery.com" "http://www.placecage.com" "http://placekitten.com") | |
DIR="." | |
# ---------------------------------------- |
This file contains hidden or 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
// Materialのtransparentが有効になっていないとopacityを設定しても反映されない | |
var mesh = new THREE.Mesh( | |
new THREE.SphereGeometry( 30, 30, 30 ), | |
new THREE.MeshBasicMaterial({color:0x00ff00, transparent:true, opacity:0.5}) | |
); |
This file contains hidden or 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
# ブラウザを起動する | |
# 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 |
This file contains hidden or 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
#!/usr/bin/env bash | |
# ---------------------------------------- | |
# config | |
# | |
PRIVATE_NETWORK_IP="192.168.1.160" | |
PRIVATE_NETWORK_GW="192.168.1.1" | |
MYSQL_PASSWORD="mysqlpswd"; |
This file contains hidden or 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 | |
class CalcTest extends PHPUnit_Framework_TestCase { | |
public function __construct() { | |
$this->hoge = 'hogehoge'; | |
} | |
private $_hoge; |
This file contains hidden or 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 | |
/** | |
* | |
* 当然そのまま。型が異なっててもそのまま。 | |
* | |
*/ | |
$arr = array(1, 2, 3); | |
$casted = (array) $arr; | |
var_dump($casted); |
NewerOlder