Skip to content

Instantly share code, notes, and snippets.

View waxzce's full-sized avatar

Quentin ADAM waxzce

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd" securityLevel="user">
<meta>
<author>Quentin ADAM - waxzce</author>
<documentationURL>http://delicious.com/help/api</documentationURL>
<sampleQuery description="get a long url and many other informations from a shorturl : google.com">select * from {table} where url='http://is.gd/w';</sampleQuery>
</meta>
<bindings>
<insert produces="XML">
<urls>
/*
* Copyright 2008 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
Pour un bon Live Twitt je recommande :
- un tag approprié (le canal #nantes ou paris n'est pas adapté même si l'événement est à nantes ou paris), il se peut qu'il faille en créer un.
- faites les en reply si possible : si l'événement est une réunion du jug nantais, faites votre live twitt en reply
- annoncez vos live twitts
exemple :
python -mjson.tool $1
@waxzce
waxzce / find_active_network.sh
Created March 13, 2011 07:26
usefull for stupid dhcp stoping working at the hostel >_<
#/bin/bash
i=0
while [ $i -lt 255 ];
do
ifconfig en1 inet 192.168.$i.33/24
#ifconfig en1
echo $i
nmap -sP 192.168.$i.0/24
let $[ i += 1 ]
done
@waxzce
waxzce / migr.sh
Created July 15, 2011 18:49
push a gitosys serv into a gitolite new serv -- NB : you have to config yourself
#!/bin/bash
HOME=/home/git/
REPO_BASE=/home/git/repositories
mirror=gitolite@target
find . -type d -name "*.git" | cut -c3- | sort | while read r
do
cd $HOME; cd $REPO_BASE; cd $r
printf "$r "
@waxzce
waxzce / gist:1617346
Created January 15, 2012 21:09
find dups id in your html
var find_dbl_ids = function(){
var names = {};
$('*[id]').each(function(i, e){
var iid = $(e).attr('id');
if(iid != null && iid != ''){
if(names[iid] == undefined){
names[iid] = 1;
}else{
names[iid] = names[iid]+1;
@waxzce
waxzce / git-gitolite-clone
Created September 15, 2012 17:56
Clone all git repo from a gitolite
#!/bin/bash
# USAGE : git gitolite-clone <user@host>
GITOLITE_URL=$1
GOGO=0
for i in $(ssh $GITOLITE_URL info)
do
if [ $GOGO -eq 1 ] ; then
if [[ $i != "R" && $i != "W" ]] ; then
package utils
object sha256 {
class StringSHAHelper(str: String) {
val md = java.security.MessageDigest.getInstance("SHA-256")
def sha_256 = (new sun.misc.BASE64Encoder).encode(md.digest(str.getBytes))
}
implicit def stringWrapper(string: String) = new StringSHAHelper(string)
}
package filters
import play.api.mvc._
import controllers.Default
import play.api.libs.iteratee.Enumerator
import play.Logger
object CorsFilter extends Filter {