Install Xcode, Remote Desktop, and Slack from the App Store
Wait until Xcode is complete
Run the following:
touch ~/.bash_profile
xcode-select --install
defaults write com.apple.finder AppleShowAllFiles YES
/** | |
* This pairs an ES6 promise and the AbortController together. | |
* Useful where you need to stop the promise from continuing externally. | |
* Note: Async/await will not work with this class. Use the toAwaitable function to convert it back to a standard promise. | |
*/ | |
export class AbortablePromise<T> implements PromiseLike<T> { | |
private abortController: AbortController; | |
private promiseWrapper: Promise<T>; | |
private cancelEvent!: (reason?: unknown) => void; |
/* eslint-disable */ | |
// @ts-nocheck | |
interface Console { | |
hex(data: any): void; | |
} | |
console.hex = (d) => console.log((Object(d).buffer instanceof ArrayBuffer ? new Uint8Array(d.buffer) : | |
typeof d === 'string' ? (new TextEncoder('utf-8')).encode(d) : | |
new Uint8ClampedArray(d)).reduce((p, c, i, a) => p + (i % 16 === 0 ? i.toString(16).padStart(6, 0) + ' ' : ' ') + | |
c.toString(16).padStart(2, 0) + (i === a.length - 1 || i % 16 === 15 ? |
#!/usr/bin/env node | |
/** | |
* This cordova hook checks to see if the developer is building a release version, | |
* but not in a production environment. | |
* | |
* Add this to config.xml | |
* <hook src="envcheck.js" type="before_prepare" /> | |
* <hook src="envcheck.js" type="after_build" /> | |
*/ |
function coerceIntWithDefault(test) { | |
test = (test !== 0) ? (test || 42) : 0; | |
return test; | |
}; | |
var test; | |
coerceIntWithDefault(test); | |
// test === 42; | |
test = 78; | |
coerceIntWithDefault(test); |
angular.module('twFilters', []) | |
.filter('unique', function () { | |
return function (arr, field) { | |
var o = {}, i, l = (arr) ? arr.length : 0, r = []; | |
for (i = 0; i < l; i += 1) { | |
o[arr[i][field]] = arr[i]; | |
} | |
for (i in o) { | |
r.push(o[i]); | |
} |
//Make a dictionary of distinct records | |
Dictionary<int, Record> records = findRecords(keys) | |
.GroupBy(r => r.keyid) | |
.ToDictionary(g => g.Key, g => g.First()); | |
records.TryGetValue(key, out record); | |
//Make groups from lines | |
Lines.GroupBy(l => l.ReleaseDate, (k, g) => new { Key = k, Lines = g.ToList() } ).OrderBy(g => g.Key).ToList(); | |
// Find and remove duplicates |
git init | |
git config --add user.email [email protected] | |
git config --add user.name thewass | |
echo "# readme" >> readme.md | |
git add . | |
git commit -m "Initial Commit" |
git config -e --global
[alias]
superlog = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blu$ supertimelog = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset$ co = checkout
br = branch
ci = commit
st = status
psuh = push
spuh = push
/* | |
Code block | |
//*/ | |
//* <--Added a slash here! | |
Code block | |
//*/ | |
/* |