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
| $ heroku container:login |
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
| ModelFrame(A ~ B + C, dataframe) |
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
| # -*- mode: ruby -*- | |
| # # vi: set ft=ruby : | |
| require 'fileutils' | |
| Vagrant.require_version ">= 1.6.0" | |
| # Make sure the vagrant-ignition plugin is installed | |
| required_plugins = %w(vagrant-ignition) |
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
| sudo aptitude install alien libaio1 unixodbc unzip |
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 [0/0] | |
| set -Ceu | |
| for c in $(brew cask list); do | |
| info=$(brew cask info $c) | |
| installed_ver=$(echo "$info" |awk 'NR==1' |cut -d" " -f 2) | |
| current_ver=$(echo "$info" |awk 'NR==3' | cut -d" " -f 1 | rev |cut -d"/" -f 1| rev) | |
| if [ "$current_ver" == "latest" ]; then | |
| echo "$c is installed '$installed_ver', current is '$current_ver'" | |
| echo -n "upgrade?[y/n]>" |
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
| var gulp = require('gulp'); | |
| var connect = require('gulp-connect'); | |
| var modRewrite = require('connect-modrewrite'); | |
| var runSequence = require('run-sequence'); | |
| var shell = require('gulp-shell'); | |
| //proxy all requests to /api to localhost:3000 for rails api | |
| gulp.task('connect', function(){ | |
| connect.server({ | |
| root: './app', |
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
| app[web.1]: Parameters: {"utf8"=>"✓", "q"=>{"order_date_cont"=>"2015-03-02"}} | |
| app[web.1]: Purchase Load (4.9ms) SELECT DISTINCT "purchases".* FROM "purchases" WHERE ("purchases"."order_date" ILIKE '%2015-03-02%') ORDER BY "purchases"."order_date" DESC | |
| app[web.1]: PG::UndefinedFunction: ERROR: operator does not exist: date ~~* unknown | |
| app[web.1]: LINE 1: ... FROM "purchases" WHERE ("purchases"."order_date" ILIKE '%20... | |
| app[web.1]: ^ | |
| app[web.1]: HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
| app[web.1]: SELECT DISTINCT "purchases".* FROM "purchases" WHERE ("purchases"."order_date" ILIKE '%2015-03-02%') ORDER BY "purchases"."order_date" DESC | |
| app[web.1]: Rendered shared/_search_result_box.html.erb(6.9ms) | |
| app[web.1]: Completed 500 Internal Server Error in 69ms |
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
| [ $(date +%d) = 01 ] && ruby ./batch.rb #毎初日に実行 |
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
| #確率密度(対数正規分布 平均log=5,sdlog=1.5 )で | |
| #当選番号は1から600の間から60こ抽出 | |
| sample(600,60,prob=dlnorm(1:600, meanlog=5, sdlog=1.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
| #/usr/bin/env bash | |
| set -e | |
| set -x | |
| apt-get update | |
| apt-get upgrade | |
| apt-get -y install build-essential curl git-core openssl libreadline6 libreadline6-dev \ | |
| zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev \ |