This file contains hidden or 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 | |
# xed alternative | |
# xed currently has a tendency to crash or make XCode stall | |
# for several seconds when it is used to open a file at | |
# a specific line. | |
if [ "$1" = "-l" ] || [ "$1" = "--line" ] ; then | |
line=$2 | |
file=$3 | |
else | |
line=1 |
This file contains hidden or 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) |
This file contains hidden or 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
// @flow | |
export type PouchDBPostResponse = { ok: true, id: string, rev: string } | |
export type PouchDBUpsertResponse = { updated: true, id: string, rev: string } | { updated: false } | |
export type PouchDBRemoveResponse = { ok: true, id: string, rev: string, } | { ok: false } | |
export type PouchDBFindResponse<T> = { docs: Array<T>, warning?: string } | |
export type PouchDBAllDocsResponse<T> = { rows: Array<{ doc: T, id: string, key: string, value: { rev: string } }>, total_rows: number } | |
export type PouchError = { // empirically found | |
docId: string, |
This file contains hidden or 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
// @flow | |
declare module 'odiff' { | |
declare export default function odiff(A: any, B: any): Array<{| | |
type: 'set', | |
path: Array<string | number>, | |
val: any, | |
|} | {| | |
type: 'unset', | |
path: Array<string | number>, |
This file contains hidden or 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
declare module 'codemirror' { | |
declare export default typeof CodeMirror | |
declare type Position = { line: number, ch: number } | |
declare class TextMarker { | |
changed(): void; | |
clear(): void; | |
find(): { from: Position, to: Position }; | |
} |
This file contains hidden or 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
Session.set('modalData', {template: "modal-backups", title: "Backup", files: [{name: "blah", date: new Date()}]}); | |
$('#myModal').modal(); |
This file contains hidden or 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
- (void)tableViewUpdatePerformance:(Performance *)performance { | |
[self.tableView beginUpdates]; | |
[self.tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:[self.performances indexOfObject:performance] inSection:0]] withRowAnimation:UITableViewRowAnimationNone]; | |
[self.tableView endUpdates]; | |
} |