Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block deguchi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
deguchi / MutationObserver on Mastdon
Last active May 17, 2017
View MutationObserver on Mastdon
// MutationObserver
// select the target node
var target = document.querySelector('.status-list');
// create an observer instance
var observer = new MutationObserver(function(mutations) {
// var targetContentsList = document.querySelectorAll('.status__content:not(.ox-playflagged):not(.muted)');
View React ES2015 scafold
Copyright (c) 2016 CALIL Inc.
This software is released under the MIT License.
'use strict'
deguchi /
Last active Mar 10, 2016
Google AppEngine Developement by BrowserSync
browser-sync start --proxy --files "**/*.html,**/*.js,**/*.css"
deguchi / gist:1505fbce712b826a4971
Created Sep 17, 2014
View gist:1505fbce712b826a4971
$('#map_search').submit ->
url = ''
url: url
type: "GET"
q: $('#map_query').val()
format: "json"
dataType: "jsonp"
jsonp: "json_callback"
deguchi / Elevation
Created Sep 4, 2014
カーリルAPIとGoogle Maps APIを使って図書館の高度の一覧を作成する
View Elevation
log = (obj) ->
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) ->
View ajax fileupload for IE
<!--[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="{{}}" onchange="fileupload(event);"></span>
<a href="#" class="input-group-addon btn btn-default fileinput-exists" data-dismiss="fileinput">選択解除</a>
View form macro for jinja2 on django
{%- macro form_field_label(field, label_width) -%}
<label for="id_{{}}" class="col-sm-{{label_width}} control-label">{{field.label}}:{%- if field.field.required -%}
&nbsp;<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 %}
View クロスドメインPOSTが可能なjQueryプラグイン
xpost: function(options) {
var data, flush, form, iframe, key, name, url, val;
name = "dummyxpostframe";
url = options.url;
data =;
flush = function() {
$("form[target=" + name + "]").remove();
return $("iframe[name=" + name + "]").remove();
View django jinja タグ対照表
{{ block.super }}
{{ super() }}
{{|date:"Y-m-d" }}
You can’t perform that action at this time.