Skip to content

Instantly share code, notes, and snippets.

View sebgod's full-sized avatar

Sebastian Godelet sebgod

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace System.Linq
{
public static class LuceneNetExtensions
{
/// <summary>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-GB" xml:lang="en-GB">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Binary Clock in Unicode</title>
<style type='text/css'>
body {
margin: 0;
background-color: #000000;
width: 100%;
@sebgod
sebgod / !!Using-HTML5 WebWorker.md
Last active August 29, 2015 14:00
Test of custom HTML tags and WebWorker

WebWorker API Test

  • Finding prime numbers with a silly algorithm
  • Also testing custom tags while we are at it
@sebgod
sebgod / vowel_filter.py
Created April 27, 2014 06:51
filters words with vowels from scrabble word list
vowels = set('aeiouy')
with open('TWL06.txt') as file:
for line in file:
word = line.strip().lower()
letters = set(word)
if vowels <= letters:
print word
@sebgod
sebgod / humane_dates.js
Last active August 29, 2015 14:00
Javascript Humane Dates
/*
* Javascript Humane Dates
* Copyright (c) 2008 Dean Landolt (deanlandolt.com)
* Re-write by Zach Leatherman (zachleat.com)
*/
/* Adopted from the John Resig's pretty.js
* at http://ejohn.org/blog/javascript-pretty-date
* and henrah's proposed modification
* at http://ejohn.org/blog/javascript-pretty-date/#comment-297458
*/
@sebgod
sebgod / ruby_test.html
Created May 3, 2014 13:34
Test the correct usage of the HTML <ruby> tag
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<title>Test Unicod and the ruby-Tag</title>
</head>
<body>
<article>
active_jobs=()
max_jobs=4
refresh_jobs() {
local pid
local actual_jobs=()
for pid in "${active_jobs[@]}"; do
kill -0 "$pid" 2> /dev/null \
&& actual_jobs+=("$pid") \
|| wait "$pid" # avoid zombie
function addTableRow(jQtable){
jQtable.each(function(){
var $table = $(this);
// Number of td's in the last table row
var n = $('tr:last td', this).length;
var tds = '<tr>';
for(var i = 0; i < n; i++){
tds += '<td>&nbsp;</td>';
}
tds += '</tr>';