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
#!/usr/bin/perl
# replace_resource_ids.pl
# It replaces resource IDs (R.string.xxx) in source files with resource string
# and write in STDOUT.
# usage: ./replace_resource_ids.pl strings.xml Hoge.java
use strict;
my $dictFile = $ARGV[0];
my $convertFile = $ARGV[1];
@maripo
maripo / marutai_curry_ramen.md
Created July 5, 2014 16:46
マルタイ棒ラーメンでカレー麺

マルタイ棒ラーメンでカレー麺

材料 (1人分)

  • 玉葱: 1/2個
  • マルタイ棒ラーメン: 1把
  • サラダオイル: 大さじ1
  • 鶏肉: てきとー
  • 生姜: てきとー
  • クミンシード: てきとー
  • コリアンダーパウダー: てきとー
@maripo
maripo / attiny10_int0.c
Created July 10, 2014 08:55
Attiny10 INT0 snippet
#include <avr/interrupt.h>
#include <avr/io.h>
ISR(INT0_vect) {
//Do Something
}
int main(void) {
EIMSK |= (1 << INT0);
PCMSK = (1 << PCINT0);
@maripo
maripo / curry_udon.md
Last active August 29, 2015 14:05
キーマカレー皿うどん
@maripo
maripo / rarejob_tomorrows_lesson.md
Last active August 29, 2015 14:05
RareJob Tomorrow's Lesson Bookmarklet
@maripo
maripo / NSDate+Comparison.h
Created September 1, 2014 08:34
NSDate+Comparison
#import <Foundation/Foundation.h>
@interface NSDate (Comparison)
- (BOOL) isBefore: (NSDate*) date;
- (BOOL) isAfter: (NSDate*) date;
@end
@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)
{