Skip to content

Instantly share code, notes, and snippets.

View 0xRoch's full-sized avatar
🎯
Focusing

Roch 0xRoch

🎯
Focusing
View GitHub Profile
package models;
import java.lang.annotation.*;
import java.lang.reflect.Type;
import java.util.List;
import com.google.appengine.api.datastore.Blob;
import play.data.Upload;
import play.data.binding.*;
<filter>
<filter-name>appstats</filter-name>
<filter-class>com.google.appengine.tools.appstats.AppstatsFilter</filter-class>
<init-param>
<param-name>logMessage</param-name>
<param-value>Appstats available: /appstats/details?time={ID}</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>appstats</filter-name>
$(document).ready(function() {
$('.insite').live("click", function(ev) {
var href = $(this).attr('href');
if ( history.pushState ) history.pushState( {}, document.title, href);
ev.preventDefault();
$('#content').fadeOut().load(href+' #content', function() {
$(this).fadeIn();
_gaq.push(['_trackPageview', href ]);
//window.disqus_no_style = true;
//$.getScript("http://disqus.com/forums/mnml/embed.js")
metacity&
./Dropbox/bin/eclipse-pdt/eclipse&
chromium-browser&
dropbox start&
@0xRoch
0xRoch / gist:966793
Created May 11, 2011 16:19
Return a HTTP Response code
wget --delete-after site.com 2>&1|egrep "HTTP|Length|saved" | head -1 | sed s/"HTTP request sent, awaiting response... "//
$(document).ready(function() {
$('.insite').live("click", function(ev) {
ev.preventDefault();
$('#content').load($(this).attr('href')+' #content');
});
});
@0xRoch
0xRoch / gist:874131
Created March 17, 2011 10:30
How to invalidate CloudFront files using Python
import boto
cf = boto.connect_cloudfront('key1', 'key2')
cf.create_invalidation_request("distribution_id", ["/path1","/path2"])
@0xRoch
0xRoch / gist:874107
Created March 17, 2011 10:17
How to generate a random string in MySQL
SELECT SUBSTRING(MD5(RAND()) FROM 1 FOR 6)