Skip to content

Instantly share code, notes, and snippets.

@rcmachado
rcmachado / jquery.unserialize.js
Created November 25, 2009 10:19
$.unserialize for jQuery
/**
* $.unserialize
*
* Takes a string in format "param1=value1&param2=value2" and returns an object { param1: 'value1', param2: 'value2' }. If the "param1" ends with "[]" the param is treated as an array.
*
* Example:
*
* Input: param1=value1&param2=value2
* Return: { param1 : value1, param2: value2 }
*
@taizooo
taizooo / hoge.markdown
Created December 22, 2009 02:46
gist で markdown 記法がつかえる。

#なんだかんだ

##えーと1 どういうこういう そういうどういう

##えーと2 どういうこういう そういうどういう

@azu
azu / getMemoryInfo.uc.js
Created December 25, 2010 15:21
メモリ情報をcontentスコープから取得できるように拡張
// ==UserScript==
// @name getMemoryInfo
// @namespace http://efcl.info/
// @description メモリ情報をcontentスコープから取得できるように拡張
// @include main
// ==/UserScript==
var memoryInfo = {
init: function(event) {
let doc = event.originalTarget;
//alert(doc.defaultView.location.href);
@andyedinborough
andyedinborough / jquery.oauth.js
Created June 7, 2011 19:30
Introduces $.oauth() to make using OAuth from jQuery as easy as using $.ajax()
(function (window, document, $, undefined) {
if (!$.Deferred) throw 'jQuery 1.5 is required to use the jQuery.oauth script!';
function require(name, url) {
if (window[name] === undefined)
return $.ajax({ type: 'GET', cache: true, dataType: 'script', url: url });
}
$.oauth = function (options) {
var d = $.Deferred();
<!DOCTYPE html>
<script src="url.js"></script>
<script>
var url = new URL('http://www.example.com/a/b/c.html?p=q&r=s&p&p=t#hash');
for (var key in url) {
console.log(key, url[key]);
}
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@torufurukawa
torufurukawa / gist:2723412
Created May 18, 2012 05:45
jQuery で Basic 認証のかかったリソースにアクセスする
<html>
<head>
<title>client</title>
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript" src="jquery.base64.js"></script>
<script type="text/javascript">
function getinfo() {
$.ajax({
url: "http://example.com/",
success: function(data){alert('OK');},
@wokamoto
wokamoto / replace-siteurl.php
Created September 4, 2012 23:22
WordPress のDB上のサイトURLを一気に変換
#!/usr/bin/php
<?php
switch($argc) {
case 1:
case 2:
echo "please input new site url and wp directory name!\n";
exit();
default:
$old_site = isset($argv[3]) ? $argv[3] : '';
$path = $argv[2];
@dariocravero
dariocravero / README.md
Created October 20, 2012 05:25
Save files in Meteor

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

@imaz
imaz / gist:4036786
Created November 8, 2012 04:26
rbenv に変更した後 bundle install できない件
rvmを削除してrbenv+ruby-buildに変更して1.9.3-p194をビルドしましたが、Gemfileのなかの
gem 'turn', require: false
こういうハッシュでエラーが出ます。どうしたら良いでしょうか!?
[~/work/Rails/Gettan]$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.2.0]
[~/work/Rails/Gettan]$ rbenv version
1.9.3-p194 (set by /Users/imaz/.rbenv/version)