Skip to content

Instantly share code, notes, and snippets.

View roamingthings's full-sized avatar

Alexander Sparkowsky roamingthings

View GitHub Profile
import java.io.IOException;
import java.util.ArrayList;
import java.util.Map;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.WebTarget;
@angelolloqui
angelolloqui / AGCommand.h
Last active December 10, 2016 21:33
Basic UIResponder additions to handle commands
@interface AGCommand : NSObject
@property(nonatomic, weak) UIResponder *firingObject;
@property(nonatomic, readonly) SEL action;
+ (instancetype)command;
@end
@grodtron
grodtron / recolor.bash
Created May 13, 2012 22:11
A bash/ImageMagick script to recolor transparent .png files
#!/bin/bash
# A small script to change the color of mono-colored transparent .pngs
#
# Uses ImageMagick to read the most common 100% alpha color and then computes
# scale factors to multiply the whole image by.
#
# Improvements to be made:
# -deal with images containing pure black.
# -make portable between new and old ImageMagick versions
@thjanssen
thjanssen / MyEntity.java
Created April 12, 2016 05:34
Persisting Java 8 DateTime API with Hibernate 5
@Entity
public class MyEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", updatable = false, nullable = false)
private Long id;
@Column
private LocalDate date;
@vossim
vossim / LICENSE
Last active November 17, 2018 09:22
Dashing widget to display the total number of Jira issues for a JQL query
The MIT License (MIT)
Copyright (c) 2015 Simon Vos
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@matthiasplappert
matthiasplappert / uikonf2014-slides.md
Last active November 28, 2018 13:04
UIKonf 2014 Slides
@hvolkmer
hvolkmer / gist:4020468
Created November 5, 2012 21:32 — forked from aderyabin/gist:1465125
AppleScript to migrate from Things to Omnifocus
--------------------------------------------------
--------------------------------------------------
-- Import tasks from Things to OmniFocus
--------------------------------------------------
--------------------------------------------------
--
-- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2
--
-- Added: creation date, due date, start date functionality
@kopischke
kopischke / markdown2evernote.rb
Created June 5, 2011 16:57
OS X service scripts
#!/usr/bin/env ruby -wKU
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/)
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/)
# Changes: – create only one Evernote note per (Multi)Markdown input passed (instead of one per line)
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript)
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script)
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing;
# note smart typography cannot be disabled in MMD 3.0 and 3.0.1
# – handle both smart typography processing scripts (ie. SmartyPants.pl)
@mwaterfall
mwaterfall / gist:953664
Created May 3, 2011 16:28
NSDate from Internet Date & Time String
//
// NSDate+InternetDateTime.h
// MWFeedParser
//
// Created by Michael Waterfall on 07/10/2010.
// Copyright 2010 Michael Waterfall. All rights reserved.
//
#import <Foundation/Foundation.h>
@joshlong
joshlong / TestApplication.java
Last active June 9, 2022 09:49
an example demonstrating Spring's new `InjectionPoint` support
package com.example;
import org.springframework.beans.factory.InjectionPoint;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;