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
@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
}
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 14, 2024 11:40
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@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
@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)"],
@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:

#!/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.
@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;
}
@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);
@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) {
@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!