Skip to content

Instantly share code, notes, and snippets.

@ben-xD
ben-xD / direct_apns.sh
Created September 22, 2021 04:10
Direct APNs Push Notifications
#!/usr/bin/env bash
# your team id located in the developer portal
TEAMID="replace"
@ben-xD
ben-xD / embedded.mobileprovision
Created August 28, 2021 07:29
`embedded.mobileprovision` generated from a fresh Xcode project + push notifications capability added
0�P *�H��
��P0�P 1 0 +0�@� *�H��
��@��@�<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppIDName</key>
<string>XC com example app</string>
<key>ApplicationIdentifierPrefix</key>
<array>
@ben-xD
ben-xD / Xcode13-destinations
Created June 21, 2021 21:39
Available destinations in my Xcode project (running Xcode 13 beta)
Command line invocation:
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/xcodebuild -workspace ./AblyAssetTracking.xcworkspace -scheme AblyAssetTrackingPublisher -showdestinations
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Resolve Package Graph
Invalid Exclude '/Users/zen/Library/Developer/Xcode/DerivedData/AblyAssetTracking-foyhrasfekgzxgdqmlvrezlukfet/SourcePackages/checkouts/mapbox-maps-ios/Sources/MapboxMaps/Style/README.md': File not found.ignoring declared target(s) 'swift-nio-zlib-support' in the system package
Resolved source packages:
swift-argument-parser: https://github.com/apple/swift-argument-parser.git @ 0.3.2
@ben-xD
ben-xD / archive-env.log
Created March 29, 2021 15:46
XCode environment variables available during Archiving
ACTION=install
ADDITIONAL_SDKS=
AD_HOC_CODE_SIGNING_ALLOWED=YES
ALL_OTHER_LDFLAGS=' '
ALL_OTHER_LIBTOOLFLAGS=' '
ALTERNATE_GROUP=staff
ALTERNATE_LINKER=
ALTERNATE_MODE=u+w,go-w,a+rX
ALTERNATE_OWNER=username
ALTERNATE_PERMISSIONS_FILES=
@ben-xD
ben-xD / pyenv issue
Created November 16, 2020 19:34
Pyenv's python gives me ERROR: No matching distribution found for tensorflow==2.3.1
This file has been truncated, but you can view the full file.
python-build: use [email protected] from homebrew
python-build: use readline from homebrew
/var/folders/rq/tslhk4cj60g2tlr0r5twqhf40000gq/T/python-build.20201116192729.9649 ~/Desktop
/var/folders/rq/tslhk4cj60g2tlr0r5twqhf40000gq/T/python-build.20201116192729.9649/Python-3.8.6 /var/folders/rq/tslhk4cj60g2tlr0r5twqhf40000gq/T/python-build.20201116192729.9649 ~/Desktop
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
checking build system type... x86_64-apple-darwin20.1.0
checking host system type... x86_64-apple-darwin20.1.0
checking for python3.8... python3.8
checking for --enable-universalsdk... no
@ben-xD
ben-xD / lintlist.txt
Created September 28, 2020 20:00
`lint list` output
Valid issue categories:
Correctness
Correctness:Messages
Correctness:Chrome OS
Security
Performance
Usability:Typography
Usability:Icons
Usability
Accessibility
@ben-xD
ben-xD / shortestCellPath.py
Last active July 31, 2020 18:33
A interview question attempt: Shortest Cell Path
def shortestCellPath(grid, sr, sc, tr, tc):
"""
@param grid: int[][]
@param sr: int
@param sc: int
@param tr: int
@param tc: int
@return: int
"""
@ben-xD
ben-xD / main.dart
Last active June 11, 2020 16:05
HansMuller's Gist from https://github.com/flutter/flutter/issues/31483, re-created as main.dart for usage in DartPad (https://dartpad.dev/1ab3b7488814a528e399d4fd60011303)
import 'package:flutter/material.dart';
class NavigatorPage extends StatefulWidget {
const NavigatorPage({ Key key, this.child }) : super(key: key);
final Widget child;
@override
_NavigatorPageState createState() => _NavigatorPageState();
}
@ben-xD
ben-xD / snapshot_coverage
Created April 19, 2020 13:20
`jest --coverage` and `jest` create inconsistent snapshots
> [email protected] test:coverage /Users/ben/butter/repos/carbonfootprint/react-native-app
> jest --coverage
PASS src/screens/__tests__/Feedback-test.js
PASS src/components/__tests__/Correction-test.js
PASS src/screens/__tests__/Login-test.js
PASS src/screens/__tests__/Signup-test.js
PASS src/components/__tests__/CarbonFootprintScore-test.js (5.73s)
PASS src/components/__tests__/MonthlyDisplay-test.js (6.377s)