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
--- SiteBuilder.php 2020-01-23 16:06:06.000000000 +0900 | |
+++ SiteBuilder.1.php 2020-01-23 16:06:03.000000000 +0900 | |
@@ -33,8 +33,8 @@ | |
public function build($source, $destination, $siteData) | |
{ | |
$this->prepareDirectory($this->cachePath, ! $this->useCache); | |
- $generatedFiles = $this->generateFiles($source, $siteData); | |
$this->prepareDirectory($destination, true); | |
+ $generatedFiles = $this->generateFiles($source, $siteData); | |
$outputFiles = $this->writeFiles($generatedFiles, $destination); |
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
$fs = 0.1; | |
row_count = 5; | |
col_count = 7; | |
hole_width = 14.1; | |
hole_height = 14.1; | |
hole_radius = 0.3; | |
screw_diameter = 2.2; |
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
sudo yum -y install git | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo '# rbenv | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)"' | tee -a ~/.bash_profile | |
exec $SHELL --login | |
sudo yum -y install unzip bzip2 gcc openssl-devel readline-devel zlib-devel java-1.8.0-openjdk |
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/sh | |
BLOCK_SIZE=4096 | |
TARGET_SIZE=16 | |
GiB_SIZE=1073741824 | |
MOUNT_PATH=/storage | |
STORAGE_PATH=/usbstorage.bin | |
STORAGE_SIZE=$((${TARGET_SIZE} * ${GiB_SIZE})) | |
COUNT_SIZE=$((${STORAGE_SIZE}/${BLOCK_SIZE})) |
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
package main | |
//#cgo pkg-config: opencv | |
//#include <cv.h> | |
//#include <highgui.h> | |
import "C" | |
import ( | |
"os" | |
"flag" |
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
package curry; | |
import java.util.function.Function; | |
interface F<T, R> extends Function<T, R> {} | |
public class Curry { | |
public static void main(String[] args) { | |
F<Integer, F<Integer, Integer>> compare = max -> x -> (max <= x) ? max : x; |
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 | |
/** | |
* 指定値を最大値として、入力された値が最大値以上の場合は | |
* 最大値として扱うカリー化関数 | |
* @param integer $max 最大値 | |
* @return Closure 比較関数 f(x) | |
*/ | |
function compare($max) { | |
return function ($x) use ($max) { | |
return ($x < $max) ? $x : $max; |
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/sh | |
# 通知先URL | |
imkayac='http://im.kayac.com/api/post/<USERNAME>' | |
# パスワード | |
passwd='<PASSWORD>' | |
# もしうまくテザリングできなかったらsleepの数字を増やす | |
sleep 5 |
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 | |
$d = new stdClass(); | |
$d->a = 'a'; | |
$d->b = 'b'; | |
$a = new ArrayWapper(range(1,9)); | |
$a->map(function($a) { return $a * 10; }); | |
$s = 0; |
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
/*global module:false*/ | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
coffee: { | |
dist: { | |
src: ['assets/coffee/**/*.coffee'], | |
dest: 'assets/js/wcv-main.js' | |
} | |
}, |