Skip to content

Instantly share code, notes, and snippets.

View zolrath's full-sized avatar

Matt Furden zolrath

View GitHub Profile
@doobeh
doobeh / gist:3188318
Created July 27, 2012 14:27
Installing WeasyPrint on Windows

Installing WeasyPrint on Windows

WeasyPrint converts HTML including images to PDF, it's cross platform but Windows requires a decent amount of massaging to persuade it to work.

To install Pango and Cairo download the [all in one bundle][GTK] of the GTK+ stack and extract the archive to C:\GTK.

You'll need to add the GTK bin folder to your system path so the various

@tzachz
tzachz / gist:5047526
Created February 27, 2013 12:17
Dropwizard upstart file example
author "Your Name"
description "upstart script for sample-dw-service"
# respawn the job up to 5 times within a 10 second period.
# If the job exceeds these values, it will be stopped and
# marked as failed.
respawn
respawn limit 5 10
# move to this service's working directory
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@bowenwr
bowenwr / HelperResource.java
Created September 5, 2014 18:44
Jersey Pagination Example for Jersey Mailing List Request
public class HelperResource {
public static void setRequestOptions(ContainerRequestContext requestContext, RequestOptions requestOptions) {
requestContext.setProperty("requestOptions", requestOptions);
}
public static boolean isBodyRequested(ContainerRequestContext requestContext) {
// Do not return a body for head methods, but we might want to calculate paging / headers, etc.
// For now this is getting rewritten as GET by Jersey, but it might be changed later:
// https://java.net/jira/browse/JERSEY-2460
@digitalshadow
digitalshadow / OpenSimplexNoise.cs
Last active October 22, 2024 07:18
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest
@Singleton
@javax.ws.rs.ext.Provider
public class NewRelicTimedApplicationListener implements ApplicationEventListener {
private Map<Method,String> methodMap = new HashMap<>();
@Override
public void onEvent(ApplicationEvent event) {
if (event.getType() == ApplicationEvent.Type.INITIALIZATION_APP_FINISHED) {
for (Resource resource : event.getResourceModel().getResources()) {
export var viewportResizeStanddown = 0.5
var viewportResizeCounter = 0.0
signal settingsChanged()
signal particlesSettingsChanged()
signal removeGpuParticles()
func forbidParticles(time):
particlesForbiddenCounter = time
particlesForbidden = true