Skip to content

Instantly share code, notes, and snippets.

View Andrewpk's full-sized avatar
🐶
wat

Andrew Kehrig Andrewpk

🐶
wat
  • wat
  • Royal Oak, Michigan
View GitHub Profile
@miyagawa
miyagawa / podcast-feed-agents.pl
Last active August 29, 2015 14:10
Analyze podcast feed clients
#!/usr/bin/env perl
use strict;
use warnings;
use JSON;
my $matching_path = qr!^/rebuildfm!;
my @UA = (
[qr/^Podcasts?\/\d/ => "Apple Podcasts"],
[qr/^iTunes\/[\d\.]+ \(Macintosh/ => "iTunes (OS X)"],
@detroitlabradors
detroitlabradors / gist:4235764
Last active October 13, 2015 18:08
Welcome to the Explorers Club

Greetings and Welcome Explorer,

I am glad that you found your way here. You deserve better than another routine day of drudgery aboard the Stellar Patrol Ship Feinstein. I think we want to work with you.

Detroit Labs is in the business of creating mobile apps. We do this by inviting the best and most interesting people to join our team, and asking them to solve the hard problems that go along with building and shipping software. Since you are reading this, you may be one of those people. I hope so!

@igorw
igorw / y.php
Created December 30, 2012 16:49
<?php
$factorial = call_user_func(
function ($le) {
return call_user_func(
function ($f) {
return $f($f);
},
function ($f) use ($le) {
return $le(function ($x) use ($f) {
@melo
melo / merge.pl
Created January 9, 2013 17:22
Merge the content of two single page PDFs, on a pretty template, the other an invoice, into a new *single* page PDF, using Perl PDF::API2
#!/usr/bin/env perl
use strict;
use warnings;
use PDF::API2;
my ($template_pdf, $data_pdf) = @ARGV;
my $t_pdf = PDF::API2->open($template_pdf);
my $page = $t_pdf->openpage(1);
@melo
melo / eheh.pl
Created August 8, 2013 07:49
Make up your mind, please...
if ($config->{sms_notifications_enabled}) {
$log->warn("SMS notifications are disabled, use ENV ENABLE_SMS_NOTIFICATIONS to enable")
unless $config->{i_know_sms_notifications_are_disabled_please_leave_me_alone};
return;
}
#!/usr/bin/env ruby
#
# This script can be used to check the in-store availability of the iPhone 5S.
# By default, it searches for all AT&T models. You can change this by editing
# the MY_DEVICES array below. While the Apple API supports searching for
# multiple devices at once, there is a limit.
#
# Once you have properly configured the MY_DEVICES array, you can run this script
# from the terminal. It takes a single parameter, which should be the zip code you
# wish to use for your search.
@jmreidy
jmreidy / test_mocha.opts
Last active January 9, 2018 11:49
Unit test React Native with Mocha
--compilers js:./test/support/compiler
--require ./test/support/init
@SlaunchaMan
SlaunchaMan / SwiftUIStackView.swift
Created June 16, 2020 14:03
A SwiftUI-like function builder approach for UIStackView.
//: A UIKit based Playground for presenting user interface
import UIKit
import PlaygroundSupport
@_functionBuilder
struct UIViewBuilder {
static func buildBlock(_ views: UIView...) -> [UIView] {
return views
}
@myobie
myobie / mountain-lion-brew-setup.markdown
Created February 18, 2012 20:14
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@stkent
stkent / android_studio_shortcuts.md
Last active November 1, 2023 11:58
Android Studio Shortcuts (Mac)

Android Studio Shortcuts (Mac)

Notes:

  • Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
  • Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
  • A fairly complete shortcut list can be found here.

Useful symbols: