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
| $.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 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
| テンプレートの継承 | |
| {{ block.super }} | |
| ↓ | |
| {{ super() }} | |
| 日付 | |
| {{ recipe.date|date:"Y-m-d" }} |
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 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 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
| window.onerror = function(mes,file,num){ | |
| track_jserror(mes,file,num); | |
| return false; | |
| } | |
| function track_jserror(mes,file,num){ | |
| if("_gaq" in window){ | |
| _gaq.push(['_trackEvent', 'Javascript', 'Error', [ | |
| "file : " + file, | |
| "line : " + num, | |
| "message : " + mes |
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
| javascript:var calil='calil.jp',local='127.0.0.1:8080',oldhost=calil,newhost=local;if(location.host!=calil){oldhost=local;newhost=calil;}location='http://'+newhost+location.pathname+location.search; |
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
| # original https://gist.github.com/715378 | |
| # thanks hakobe! | |
| # Macで動作確認。Windowsの場合、spawnを使うとよいらしい。 参考: https://gist.github.com/325036 | |
| require 'webrick' | |
| server = WEBrick::HTTPServer.new({ | |
| :DocumentRoot => nil, | |
| :BindAddress => '0.0.0.0', | |
| :Port => 9090 |
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
| (function() { | |
| var ImageTab, Tab, TabGroup, Window, log, tab1, tab2, tab3, tabGroup; | |
| var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { | |
| for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } | |
| function ctor() { this.constructor = child; } | |
| ctor.prototype = parent.prototype; | |
| child.prototype = new ctor; | |
| child.__super__ = parent.prototype; | |
| return child; | |
| }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; |
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
| # debug function | |
| log = (obj) -> Titanium.API.log obj | |
| Titanium.UI.setBackgroundColor '#000' | |
| class TabGroup | |
| constructor: () -> | |
| @tabGroup = Titanium.UI.createTabGroup() | |
| return @tabGroup |
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
| Titanium.UI.setBackgroundColor '#000' | |
| tabGroup = Titanium.UI.createTabGroup() | |
| win1 = Titanium.UI.createWindow | |
| title:'Tab 1' | |
| backgroundColor:'#fff' | |
| tab1 = Titanium.UI.createTab | |
| icon:'KS_nav_views.png' |
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
| # original https://gist.github.com/715378 | |
| # thanks hakobe! | |
| # Macで動作確認。Windowsの場合、spawnを使うとよいらしい。 参考: https://gist.github.com/325036 | |
| require 'webrick' | |
| server = WEBrick::HTTPServer.new({ | |
| :DocumentRoot => nil, | |
| :BindAddress => '0.0.0.0', | |
| :Port => 9090 |