Skip to content

Instantly share code, notes, and snippets.

View maripo's full-sized avatar
💭
I may be slow to respond.

Maripo GODA maripo

💭
I may be slow to respond.
View GitHub Profile
@maripo
maripo / UDIDkiller.h
Created February 5, 2012 05:59
Prevent "UIDevice.uniqueIdentifier" from returning real UDID value.
/**
It prevents UIDevice.uniqueIdentifier method from returning real UDID vaue.
It is useful to prevent closed-source libralies to fetch users' UDIDs against
your will.
*/
@interface UIDevice (UDIDkiller)
-(NSString*)uniqueIdentifier;
@end
@maripo
maripo / gist:1897222
Created February 24, 2012 03:49
Alert user IDs on facebook profile pages (Bookmarklet)
javascript:(function(){alert(document.querySelectorAll('div.profilePic>img')[0].src.match(/.*\/\d+_(\d+)_\d+_.\.jpg/)[1])})();
// http://www.facebook.com/profile.php?id=XXXXXXX
@maripo
maripo / gmail_clickable_logo.user.js
Created March 13, 2012 02:23
Wrap Gmail's logo by a link to "Inbox" (Greasemonkey Script)
// ==UserScript==
// @name Gmail Clickable Logo
// @namespace http://www.maripo.org
// @description Wrap Gmail's logo by a link to "Inbox"
// @include https://mail.google.com/*
// ==/UserScript==
(
function()
{
setTimeout (
@maripo
maripo / gist:2261282
Created March 31, 2012 09:33
Avoid z-index problem of Flash elements
var embeds = document.getElementsByTagName('EMBED');
for (var i=0, l=embeds.length; i<l; i++)
{
var embed = embeds[i];
embed.setAttribute('wmode', 'transparent');
var param = document.createElement('PARAM');
param.name = 'wmode';
param.value = 'transparent';
if ('OBJECT'==embed.parentNode.tagName)
{
@maripo
maripo / AndroidManifest.xml
Created May 8, 2012 06:47
Add NFC tech list to intent filter
<meta-data android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="@xml/nfc_tech_list" />
@maripo
maripo / gist:2633116
Created May 8, 2012 06:49
Facebook multi request dialog with customized categories
FB.ui({
method: 'apprequests',
message: 'TITLE',
filters:[
{name: 'CategoryA', user_ids: [userId0, userId1]},
{name: 'CategoryB', user_ids: [userId2, userId3, userId4]}
]
}, requestCallbak);
@maripo
maripo / gist:2647512
Created May 9, 2012 18:11
まりぽ帝国 国歌
神聖大宇宙まりぽ帝国 国歌
0番
まりぽ帝国 果てしなく広がる領土
まりぽ皇帝 尽きることなき野望
鉄の絆で結ばれし 我らは築く 新たなる世界を
まりぽ帝国 果てしなく広がる領土
まりぽ皇帝 尽きることなき野望
1番
@maripo
maripo / gist:2707282
Created May 16, 2012 04:06
Expand shortened URLs on twitter (bookmarklet)
javascript:(function(){as=document.getElementsByTagName('A');for(i=0;i<as.length;i++){a=as[i];attr=a.getAttribute('data-ultimate-url');if(attr){a.innerHTML=attr}}})();
@maripo
maripo / ExpandShortURLs.user.js
Created May 16, 2012 06:23
Expand shortened URLs on Twitter (userscript for Firefox and Google Chrome)
// ==UserScript==
// @name ExpandShortURLs
// @namespace maripo.org
// @description Expand shortened URL on Twitter
// @include https://twitter.com/*
// @version 1
// ==/UserScript==
(function()
{
@maripo
maripo / ImageAssert.java
Created July 31, 2012 07:30
JUnit assertion methods for web designers (assert existence & size of images)
package org.maripo.test;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import org.junit.Assert;