This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger": "2.0", | |
"info": { | |
"title": "Test swagger", | |
"version": "0.1.0" | |
}, | |
"definitions": { | |
"File": { | |
"title": "File", | |
"type": "object", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Parent: Error { | |
var localizedDescription: String { "p" } | |
} | |
class Child: Parent { | |
override var localizedDescription: String { "c" } | |
} | |
print("Given two error classes, Parent, and Child a kind of Parent\n") | |
let e: Result<Int, Child> = .failure(Child()) | |
let e2: Result<Int, Parent> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
//! Project version number for Proj. | |
FOUNDATION_EXPORT double ProjVersionNumber; | |
//! Project version string for Proj. | |
FOUNDATION_EXPORT const unsigned char ProjVersionString[]; | |
// In this header, you should import all the public headers of your framework using statements like #import <Proj/PublicHeader.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# jira-prepare-commit-msg: Easy commit tagging for Jira | |
# | |
# https://gist.github.com/jeremy-w/818b2980f0d9768da83249458aa67678 | |
# | |
# If you name your branch to include the Jira issue key, | |
# this hook will automatically add the issue key to your commit messages. | |
# This makes it easy to trace work back to Jira, and it also means | |
# your commits show up in the Activity tab for that issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Zoom: Auto-Close App Bouncer Tab | |
// @namespace https://bignerdranch.com/ | |
// @version 1.0 | |
// @description Close the tab Zoom uses to redirect to its app after several seconds. | |
// @author Jeremy W. Sherman <jeremy@bignerdranch.com> | |
// @downloadURL https://gist.github.com/jeremy-w/8d04eb16d48357b150ec2d9337129702/raw/zoom-auto-close-tab.user.js | |
// @match https://zoom.us/j/* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
This was a small test bench to see how [Moshi](https://github.com/square/moshi) | |
behaves in the face of missing JSON fields. | |
It was prompted by Arek Olek's comment on | |
["When Nullability Lies"](https://www.bignerdranch.com/blog/when-nullability-lies-a-cautionary-tale/) | |
about how Gson's skullduggery in the service of easy JSON parsing | |
let a not-null field wind up null, go boom under the SQLite lock, | |
and take out an entire app process. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env kotlinc -script -- | |
/** | |
@file named-match-repro.kts | |
@author Jeremy W. Sherman (GitHub: @jeremy-w) | |
Demo of some perplexing behavior. | |
Questions: | |
- Main question: How do I access a named capture group in a Kotlin script? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This week, let's take a break from Python and talk a little bit | |
about Git ( http://t.dripemail2.com/c/eyJhY2NvdW50X2lkIjoiNjE2ODIxOCIsImRlb= | |
Gl2ZXJ5X2lkIjoiMjMxMTgyMzY3OSIsInVybCI6Imh0dHA6Ly9naXQtc2NtLmNvbS8_X19zPXhz= | |
d2dxc3FiNHFuMml6d3c0aXloIn0 ). I teach Git courses every few | |
months, and without fail people come into the class saying that | |
they have been using Git for a few months, and it seems to work | |
OK so long as they use the list of commands that their boss | |
provided. But if something happens that isn't on that list, and | |
if they cannot figure out what to do based on Stack Overflow, | |
they're sunk. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Process: Apero [58055] | |
Path: /Applications/Apero.app/Contents/MacOS/Apero | |
Identifier: io.aya.Apero | |
Version: 1.7.3 (23) | |
App Item ID: 1219902108 | |
App External ID: 825340621 | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [1] | |
Responsible: Apero [58055] | |
User ID: 501 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
import sys | |
import json | |
import requests | |
import datetime | |
user_id = sys.argv[1] # use @username format here | |
adn_token = sys.argv[2] # Your ADN token | |
auth_data = 'Bearer ' + adn_token |
NewerOlder