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
db.client.create_table( | |
table_name: "test", | |
attribute_definitions: [ | |
{attribute_name: "name", attribute_type: "S"}, | |
{attribute_name: "number", attribute_type: "N"} | |
], | |
key_schema: [ | |
{attribute_name: "number", key_type: "HASH"}, | |
{attribute_name: "name", key_type: "RANGE"} | |
], |
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
$dynamodb = dynamodb_client(:tokyo) | |
def create(name, params) | |
table = nil | |
if params[:range] == nil | |
table = $dynamodb.tables.create(name, 1, 1, | |
hash_key: params[:hash]) | |
else | |
table = $dynamodb.tables.create(name, 1, 1, | |
hash_key: params[:hash], |
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 su | |
apt-get update | |
apt-get install git-core rbenv ruby-build ruby-bundler | |
gem install bundler | |
apt-get upgrade | |
vi /root/.bashrc | |
# 最終行に以下を追加 | |
# export PATH="$HOME/.rbenv/bin:$PATH" | |
# eval "$(rbenv init -)" |
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
expect{@post.vote_tag(tagname: nil)}.to raise_error(ArgumentError) |
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
# Never trust parameters from the scary internet, only allow the white list through. | |
def post_params | |
params.require(:post).permit(:userid, :file_name, :file_hash) | |
end |
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
# SequelでJSON出力ができるようになる | |
class Sequel::Dataset | |
def to_json | |
naked.all.to_json | |
end | |
end |
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
post '/vote/tag/create' do | |
tag_name = params[:tag_name] | |
begin | |
Tag.create(tag_name) | |
rescue ArgumentError => e | |
halt 400, e.message | |
end | |
#tag_name | |
end |
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
using UnityEngine; | |
using System.Collections.Generic; | |
using System.Collections; | |
using System.IO; | |
public class SimpleMorphing : MonoBehaviour | |
{ | |
public GameObject pmx_model; | |
void ExportFormat() |
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
Internal compiler error. See the console log for more information. output was: | |
Unhandled Exception: System.StackOverflowException: The requested operation caused a stack overflow. | |
at Mono.CSharp.Block.ResolveMeta (Mono.CSharp.BlockContext ec, Int32 offset) [0x00000] in <filename unknown>:0 | |
at Mono.CSharp.Block.ResolveMeta (Mono.CSharp.BlockContext ec, Int32 offset) [0x00000] in <filename unknown>:0 | |
at Mono.CSharp.Block.ResolveMeta (Mono.CSharp.BlockContext ec, Int32 offset) [0x00000] in <filename unknown>:0 | |
at Mono.CSharp.Block.ResolveMeta (Mono.CSharp.BlockContext ec, Int32 offset) [0x00000] in <filename unknown>: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
using UnityEngine; | |
using System.Collections; | |
public class SkinLoader : MonoBehaviour | |
{ | |
public GameObject target_object; | |
// Use this for initialization | |
IEnumerator Start() | |
{ |