This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# git-addremove | |
git add -A | |
git ls-files --deleted | xargs git rm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jquery.jqax.js - A plugin for jQuery ajax wrapping some common | |
// functionality aimed at .NET services and page methods | |
// Ben Cull - 18 August 2010 | |
(function($) { | |
$.jQax = function(options) { | |
// Load Defaults and make them public | |
this.defaults = { | |
ShowLoading: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="print.css" rel="stylesheet" type="text/css" media="screen,print"/> | |
... | |
<div style="-fs-page-sequence: start; page-break-before: always"> | |
<div style="position: running(current);"> | |
<div id="page-header" class="small"> | |
<span class="align-left">some stuff here</span> | |
<span class="align-right">some other stuff here</span> | |
<div class="line"> </div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.wicket.ajax.AbstractAjaxTimerBehavior; | |
import org.apache.wicket.ajax.AjaxRequestTarget; | |
import org.apache.wicket.util.time.Duration; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.Future; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab('org.mortbay.jetty:jetty-embedded:6.1.25') | |
@Grab('com.h2database:h2:1.2.144') | |
@Grab('mysql:mysql-connector-java:5.1.13') | |
import org.mortbay.jetty.Server | |
import org.mortbay.jetty.servlet.Context | |
import org.h2.server.web.WebServlet | |
def server = new Server(8080) | |
new Context(server, "/", Context.SESSIONS).addServlet(WebServlet, "/*") | |
server.start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See: http://stackoverflow.com/questions/3441916/automapper-mapping-issue-with-inheritance-and-abstract-base-class-on-collection/5749579#5749579 | |
// | |
// For use with AutoMapper | |
public class ProxyConverter<TSource, TDestination> : ITypeConverter<TSource, TDestination> | |
where TSource : class | |
where TDestination : class | |
{ | |
public TDestination Convert(ResolutionContext context) | |
{ | |
// Get dynamic proxy base type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.wicket.Component; | |
import org.apache.wicket.ajax.calldecorator.AjaxCallDecorator; | |
/** | |
* Ajax call decorator to block the page while the Ajax callback | |
* occurs. | |
* | |
* For some reason the jQuery plugin used for this decorator continues | |
* with a spinning wheel after the response is done until focus leaves | |
* the form component. Same thing happens on their web site. Find a better |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.wicket.ajax.AjaxRequestTarget; | |
import org.apache.wicket.ajax.markup.html.AjaxFallbackLink; | |
import org.apache.wicket.extensions.markup.html.tabs.ITab; | |
import org.apache.wicket.markup.html.WebMarkupContainer; | |
import org.apache.wicket.model.IModel; | |
import java.util.List; | |
/** | |
* Ajax based extension of the dynamic tabbed panel |
OlderNewer