Skip to content

Instantly share code, notes, and snippets.

View wilg's full-sized avatar
🚀
Doing new things

Wil Gieseler wilg

🚀
Doing new things
View GitHub Profile
var Slideshow = Class.create({
// USAGE
//
// <script type="text/javascript">
// document.observe("dom:loaded", function() {
// new Slideshow("slideshow", image_list).setImageDimensions(800, 340).setSlideDuration(2.0).start();
// });
// </script>
//
# encoding: utf-8
class AvatarUploader < CarrierWave::Uploader::Base
include Cloudinary::CarrierWave
process :convert => 'jpg'
process :tags => ['avatar']
process :angle => "exif"
process :default_image => "/assets/profile_profpictureplaceholder.png"
(function() {
var Rect, rectForOverlay, updateMarkers;
jQuery(function() {
var map, options;
if (!($("#module-location-map").length > 0)) {
return;
}
window.overlays = [];
options = {
jQuery ->
return unless $("#module-location-map").length > 0
window.overlays = []
# Setup Map
options = {
center: new google.maps.LatLng(34.1626653, -118.2518423),
zoom: 3,
class ExiftoolPatched < MiniExiftool
def initialize_from_hash hash
@@separator = ', '
super
end
end
@wilg
wilg / gist:7313263
Last active December 27, 2015 10:39
public Color GetInterpolatedPixel(float x, float y, float z) {
x = Mathf.Clamp(x, 0, size - 1);
y = Mathf.Clamp(y, 0, size - 1);
z = Mathf.Clamp(z, 0, size - 1);
int lowerX = Mathf.Clamp(Mathf.FloorToInt(x), 0, size - 1);
int upperX = Mathf.Clamp(lowerX + 1, 0, size - 1);
int lowerY = Mathf.Clamp(Mathf.FloorToInt(y), 0, size - 1);
int upperY = Mathf.Clamp(lowerY + 1, 0, size - 1);
Pod::Spec.new do |s|
s.name = 'Nimbus'
s.version = '1.0.0'
s.license = 'Apache License, Version 2.0'
s.summary = 'An iOS framework whose growth is bounded by O(documentation).'
s.homepage = 'http://docs.nimbuskit.info/index.html'
s.author = { 'Jeff Verkoeyen' => 'jverkoey@gmail.com',
'Bubnov Slavik' => 'bubnovslavik@gmail.com',
'Roger Chapman' => 'rogchap@gmail.com',
'Manu Cornet' => 'manu.cornet@gmail.com',
@wilg
wilg / README.md
Last active March 14, 2021 09:01 — forked from mbostock/.block
@wilg
wilg / gist:10326783
Created April 9, 2014 22:47
keybase.md

Keybase proof

I hereby claim:

  • I am wilg on github.
  • I am wilg (https://keybase.io/wilg) on keybase.
  • I have a public key whose fingerprint is 0923 2043 3310 05B9 7CF5 6545 1F89 B043 2A6F DCF6

To claim this, I am signing this object:

@wilg
wilg / GeneratePreviewForURL.m
Last active August 29, 2015 14:03
Quick Look Doesn't Work!
#include <CoreFoundation/CoreFoundation.h>
#include <CoreServices/CoreServices.h>
#include <QuickLook/QuickLook.h>
#include <Cocoa/Cocoa.h>
OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options);
void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview);
OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options)
{