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
q_op_map = { | |
OP_EQ: '=', | |
OP_LT: '<', | |
OP_LTE: '<=', | |
OP_GT: '>', | |
OP_GTE: '>=', | |
OP_NE: '!=', | |
OP_IN: 'IN', | |
OP_IS: 'IS', | |
OP_LIKE: 'LIKE', |
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
$(function() { | |
var topBtn = $('#page-top'); | |
topBtn.hide(); | |
$(window).scroll(function () { | |
if ($(this).scrollTop() > 80) { | |
topBtn.fadeIn(); | |
} else { | |
topBtn.fadeOut(); | |
} | |
}); |
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
<div class="social-buttons" data-url="http://www.deafway.jp/"></div> | |
<script type="text/javascript"> | |
<!-- | |
$(document).ready(function() { | |
var mixi_favorite_parse = function() { | |
$('div[data-plugins-type="mixi-favorite"]:empty').each(function(i, e) { | |
new window.__MIXI_PLUGINS__.FavoriteFrame(e); | |
}); |
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
// ==UserScript== | |
// @name Bitbucket Issue Customize Page | |
// @namespace http://makotoworld.hatenablog.com/ | |
// @description issue page customize. | |
// @include http://bitbucket.org/*/*/issues?status=new | |
// @include https://bitbucket.org/*/*/issues?status=new | |
// @version 0.1.0 | |
// ==/UserScript== | |
// @author Makoto Nozaki | |
// @history [2012-07-03] 0.1.0 initial version |
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
# DELETE | |
c = boto.connect_s3() | |
b = Bucket(c, 'deafway.jp') | |
list = b.get_all_keys() | |
for i in list: | |
if 'sign201' in i.name: | |
k = Key(b) | |
k.key = i.name | |
b.delete_key(k) |
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
video = document.getElementById('video'); | |
video.playbackRate = 2.0; //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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript">google.load("jquery", "1.7.1");</script> | |
<script type="text/javascript">google.load("jqueryui", "1.8.18");</script> | |
<script type="text/javascript"> | |
$(function() { | |
// 掲載数 |
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
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>js sample</title> | |
<script type="text/javascript" src="http://a.nzk.me/static/js/jquery-1.7.1.js"></script> |
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 python | |
# -*- coding: utf-8 -*- | |
import gdata.youtube | |
import gdata.youtube.service | |
yt_service = gdata.youtube.service.YouTubeService() | |
entry = yt_service.GetYouTubeVideoEntry(video_id='3KjgpNdcudU') | |
def PrintEntryDetails(entry): | |
print 'Video title: %s' % entry.media.title.text |
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
https://github.com/statesofpop/django-cal | |
import vobject.iCalender | |
def ical(user_id=None): | |
cal = vobject.iCalendar() | |
cal.add('method').value = 'PUBLISH' | |
cal.add('calscale').value = 'GREGORIAN' | |
cal.add('x-wr-calname').value = 'TestCal28' | |
cal.add('x-wr-timezone').value = 'Australia/Sydney' |