Skip to content

Instantly share code, notes, and snippets.

View natefanaro's full-sized avatar

Nate Fanaro natefanaro

View GitHub Profile
@natefanaro
natefanaro / StoreKitUtil.swift
Created February 28, 2020 23:47 — forked from nbasham/StoreKitUtil.swift
Enables creation of SKProduct and SKPaymentTransaction so StoreKit work flow and model can be the same on a simulator as it is on a device.
import StoreKit
public extension SKProduct {
convenience init(d : Dictionary<String, AnyObject>) {
self.init()
self.setValue(d["uid"], forKey: "productIdentifier")
self.setValue(d["title"], forKey: "localizedTitle")
self.setValue(d["detail"], forKey: "localizedDescription")
self.setValue(NSDecimalNumber(string: (d["price"] as! String?)), forKey: "price")
@natefanaro
natefanaro / mods.md
Created May 10, 2019 03:11
Monoprice Select Mini V2

Done

TODO

M301 P20 I0.02 D250 M501 M500

@natefanaro
natefanaro / google_voicemail_download.pl
Created November 24, 2014 04:11
Downloads voicemails from google voice.
#!/usr/bin/perl
# Downloads voicemails from google voice.
# This is old code, and I'm not 100% sure it still works, but I wanted to save this.
# natefanaro@gmail.com
use strict;
use WWW::Mechanize;
use DBI;
use HTTP::Cookies;

Keybase proof

I hereby claim:

  • I am natefanaro on github.
  • I am natefanaro (https://keybase.io/natefanaro) on keybase.
  • I have a public key whose fingerprint is 087C 86DE EF9C A6CF 85F7 8E5C BE24 E885 80EB B3E9

To claim this, I am signing this object:

@natefanaro
natefanaro / composer.json
Last active December 24, 2015 06:09
Sample of replacing a repo in composer with your own fork
{
"repositories":[
{
"type":"git",
"url":"https://github.com/natefanaro/Imagine"
}
{
"type":"git",
"url":"https://github.com/natefanaro/memegenerator"
}
@natefanaro
natefanaro / Model.php
Last active December 13, 2015 23:39
I accidentally a simple ORM for php
<?php
class Model {
public $limit;
public $order_by;
public $query_properties = array();
public function __call($name, $arguments)
{
if (property_exists(__CLASS__, $name)) {
$this->$name = $arguments[0];
@natefanaro
natefanaro / gist:2777715
Created May 23, 2012 20:50
Build perl module and run without install
perl Makefile.PL > /dev/null \
&& make > /dev/null \
&& perl -I blib/lib script.pl