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
#!/usr/bin/env ruby | |
require 'osx/cocoa' | |
include OSX | |
require 'net/http' | |
# get id | |
user = IO.popen("whoami", "r+").gets.chomp | |
program = ARGV[0].to_s | |
idfile = "/Users/#{user}/Library/Gyazo/id" |
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
テンプレートの継承 | |
{{ block.super }} | |
↓ | |
{{ super() }} | |
日付 | |
{{ recipe.date|date:"Y-m-d" }} |
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
$.extend({ | |
xpost: function(options) { | |
var data, flush, form, iframe, key, name, url, val; | |
name = "dummyxpostframe"; | |
url = options.url; | |
data = options.data; | |
flush = function() { | |
$("form[target=" + name + "]").remove(); | |
return $("iframe[name=" + name + "]").remove(); | |
}; |
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
{%- macro form_field_label(field, label_width) -%} | |
<label for="id_{{field.name}}" class="col-sm-{{label_width}} control-label">{{field.label}}:{%- if field.field.required -%} | |
<abbr title="この項目は必須です" class="label label-warning">必須</abbr> | |
{%- endif %}</label> | |
{% endmacro %} | |
{%- macro form_field_description(field) -%} | |
{% if field.help_text %} | |
<span class="help-block">{{ field.help_text }}</span> | |
{% endif %} |
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
<!--[if !IE]><!--> | |
<form action="/upload" method="post" enctype="multipart/form-data"> | |
<div class="fileinput fileinput-new" data-provides="fileinput"> | |
<div class="input-group"> | |
<div class="form-control uneditable-input span3" data-trigger="fileinput"><i class="glyphicon glyphicon-file fileinput-exists"></i> <span class="fileinput-filename">{% if form.value!='' %}{{form.value}}{% endif %}</span></div> | |
<span class="input-group-addon btn btn-default btn-file"><span class="fileinput-new">ファイルを選択</span><span class="fileinput-exists">変更</span><input type="file" name="{{form.name}}" onchange="fileupload(event);"></span> | |
<a href="#" class="input-group-addon btn btn-default fileinput-exists" data-dismiss="fileinput">選択解除</a> | |
</div> | |
</div> | |
</form> |
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
log = (obj) -> | |
try | |
console.log obj | |
map = new google.maps.Map(document.getElementById("map"), | |
zoom: 7 | |
center: new google.maps.LatLng(36, 138) | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
) | |
#google.maps.event.addListener map, "click", (mouseEvent) -> |
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
$('#map_search').submit -> | |
url = 'http://nominatim.openstreetmap.org/search' | |
$.ajax | |
url: url | |
type: "GET" | |
data: | |
q: $('#map_query').val() | |
format: "json" | |
dataType: "jsonp" | |
jsonp: "json_callback" |
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
browser-sync start --proxy http://127.0.0.1:8080/ --files "**/*.html,**/*.js,**/*.css" |
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
/* | |
app | |
Copyright (c) 2016 CALIL Inc. | |
This software is released under the MIT License. | |
http://opensource.org/licenses/mit-license.php | |
*/ | |
'use strict' |
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
dev_appserver.py --port=8080 . |