Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Doing new things

Wil Gieseler wilg

🚀
Doing new things
View GitHub Profile
View gist:764355
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>
//
View gist:3124753
# 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"
View gist:3160737
(function() {
var Rect, rectForOverlay, updateMarkers;
jQuery(function() {
var map, options;
if (!($("#module-location-map").length > 0)) {
return;
}
window.overlays = [];
options = {
View gist:3160745
jQuery ->
return unless $("#module-location-map").length > 0
window.overlays = []
# Setup Map
options = {
center: new google.maps.LatLng(34.1626653, -118.2518423),
zoom: 3,
View gist:3907894
class ExiftoolPatched < MiniExiftool
def initialize_from_hash hash
@@separator = ', '
super
end
end
View gist:7313263
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);
View Nimbus-without-JSONKit.podspec
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',
View gist:10326783

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 Aug 29, 2015
Quick Look Doesn't Work!
View GeneratePreviewForURL.m
#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)
{