Skip to content

Instantly share code, notes, and snippets.

View firulais's full-sized avatar

unclesrouge firulais

View GitHub Profile
@insin
insin / index.html
Last active October 29, 2024 01:21
Export a <table> to Excel - http://bl.ocks.org/insin/1031969
<!DOCTYPE html>
<html>
<head>
<title>tableToExcel Demo</title>
<script src="tableToExcel.js"></script>
</head>
<body>
<h1>tableToExcel Demo</h1>
<p>Exporting the W3C Example Table</p>
@fbuchinger
fbuchinger / .picasa.ini
Created July 9, 2011 18:26
.picasa.ini decoded
#==============================================================
# .picasa.ini FILE STRUCTURE
#
# reverse-engineered by Franz Buchinger <[email protected]>
# licensed to the public domain
#
# Picasa Version(s): 3.8.0
#
# Changelog:
# v0.1: initial release
@virtix
virtix / TestSimpleHttpNTLMConnection.java
Created November 4, 2011 20:46
Simple HttpClient 4.1 that performs an HTTP GET request through NTLM v2
package test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;
import java.util.ArrayList;
@fehmicansaglam
fehmicansaglam / Application.java
Created February 9, 2012 18:50
Accept range header and write a partial content to the response with Play! Framework.
public static void downloadFile(final Long fileId) throws IOException {
response.setHeader("Accept-Ranges", "bytes");
notFoundIfNull(fileId);
File underlyingFile = ... //load file
String fileName = ...//name of the file
Header rangeHeader = request.headers.get("range");
if (rangeHeader != null) {
throw new PartialContent(underlyingFile, fileName);
@tariqmislam
tariqmislam / setup
Created March 28, 2012 19:58
Hadoop | HBase | Zookeeper | Sqoop - Installation
##########
# For verification, you can display the OS release.
##########
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"
##########
@Olivia5k
Olivia5k / gist:2366916
Created April 12, 2012 12:29
jQuery Autocomplete custom _renderItem issue
I am having issues with jQuery Autocomplete. I am modding it to
show two kinds of items: actual matches to the search string and
suggestions (speling corrections, related keywords etc). The
backend does all the work on that; the Autocomplete is just
fed two lists.
A picture can explain better:
http://shot.ninjaloot.se/20120412.141112.png
(the data is just rasta dummy data while developing, and the
@cburgmer
cburgmer / htmlparser.js
Created June 5, 2012 20:46
John Resig's JavasScript HTML parser with bug fixes for parsing <script> & <style>
/*
* HTML Parser By John Resig (ejohn.org)
* Original code by Erik Arvidsson, Mozilla Public License
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
*
* // Use like so:
* HTMLParser(htmlString, {
* start: function(tag, attrs, unary) {},
* end: function(tag) {},
* chars: function(text) {},
@mindplay-dk
mindplay-dk / jquery.column.js
Created July 30, 2012 20:31
jQuery: find all cells (td/th) in a column of a table
/**
* Find all cells (td/th) in the column of the current cell.
* (excluding rows with cells that span multiple columns.)
*/
(function($) {
$.fn.column = function() {
return $(this)
.filter('th, td')
@pheuter
pheuter / gist:3515945
Created August 29, 2012 17:33
Handlebars.js equality check in #if conditional

Handlebars.js is a template framework for Javascript environments. It allows the construction of HTML elements using HTML and expressions wrapped in {{ }}

Limitations of {{if}}

One of the conditional block helpers Handlebars offers is the {{#if}}.

For example:

<div class="entry">
@tim-peterson
tim-peterson / jqueryui.autocomplete.js
Created October 27, 2012 14:28
jqueryui.autocomplete.js
/*!
* jQuery UI Autocomplete 1.8.20
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Autocomplete
*
* Depends: