Skip to content

Instantly share code, notes, and snippets.

View au79's full-sized avatar

Christopher Goldman au79

  • Xolvio LLC
  • SF Bay Area
View GitHub Profile
@making
making / README.md
Last active May 29, 2024 16:53
Use lima instead of Docker Desktop on Mac

Install

brew install lima docker
limactl start default
lima sudo apt -y install docker.io
lima sudo usermod -aG docker $USER
limactl stop default
@tomhicks
tomhicks / plink-plonk.js
Last active October 15, 2025 13:41
Listen to your web pages
@slenky
slenky / 01_createfiles.config
Created March 28, 2018 10:21
AWS Elastic Beanstalk -- Let's Encrypt for load-balanced environments
files:
"/home/ec2-user/set_env.sh":
mode: "000755"
owner: root
group: root
content: |
instance_id=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
region=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk -F\" '{print $4}')
ebenvname=$(aws --output text ec2 describe-tags --region $region --filters "Name=resource-id,Values=${instance_id}" "Name=key,Values=elasticbeanstalk:environment-name" | awk '{print $5}')
@brenopolanski
brenopolanski / export-svg-inkscape.md
Created December 26, 2017 13:29
Exporting an object as svg from inkscape
  1. Select the object(s) to export
  2. Open the document properties window (Ctrl+Shift+D)
  3. Select "Resize page to drawing or selection"
  4. File > Save As Copy...
  5. Select Optimized SVG as the format if you want to use it on the web
package /* YOUR PROJECT PACKAGE */.utils;
import android.support.annotation.*;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
@ValCanBuild
ValCanBuild / ReachabilityAware.swift
Last active January 25, 2016 23:41
Constrained View Controller extension which displays a "No Internet Connection" message when reachability is lost. To use it simply extend your existing ViewController and make it implement ReachabilityAware and call the startMonitoryReachability() method.
// Constrained View Controller extension which display a "No Internet Connection" message when reachability is lost.
// This implementation depends on ReachabilitySwift (https://github.com/ashleymills/Reachability.swift).
// It can easily enough be adapted to other frameworks.
// Assumes you have a localized string with the key "warning.no_internet_connection" in one of your .strings files.
// Call startMonitoringReachability() in viewWillAppear and stopMonitoringReachability() in viewDidDisappear
import ReachabilitySwift
protocol ReachabilityAware {
func startMonitoringReachability()
import requests
zips = "59221, 73949, 86515, 42223, 86044, 84536, 97635, 02861, 71749, 81137, 63673, 88063, 89439".split(', ')
url = 'https://congress.api.sunlightfoundation.com/districts/locate?apikey=4356d7e2b68340a69fb9b5e156e9cd49&zip='
for z in zips:
r = requests.get(url + z).json()['results']
print z, r
@eatonphil
eatonphil / gist:7d57257f65673b343441
Created May 5, 2015 11:47
Bot Dumps Beautiful Uncompiled Spam On My Blog
{
{I have|I’ve} been {surfing|browsing} online more than {three|3|2|4} hours today, yet
I never found any interesting article like yours. {It’s|It is}
pretty worth enough for me. {In my opinion|Personally|In my view},
if all {webmasters|site owners|website owners|web owners} and bloggers made good content as you did, the {internet|net|web} will be {much more|a lot more} useful than ever before.|
I {couldn’t|could not} {resist|refrain from} commenting.
{Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I’ll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} your {rss|rss feed} as I {can not|can’t} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service.
Do {you have|you’ve} any? {Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may
just|may|could} subscribe. Thanks.|
@chantastic
chantastic / on-jsx.markdown
Last active May 13, 2025 12:04
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@nderkach
nderkach / ios_github_gif.md
Last active February 15, 2024 23:31
How to record iOS screen and share it on github

Record a screencast with QuickTime Player

  1. Connect an iOS defice with a cable
  2. In QuickTime Player: Option-Cmd-N (New Movie Recording) -> Select your device from the recording menu:

http://cl.ly/image/1w0y3Y0H2g2X/record.png

Install gifify