Hello. :-) I work on Mobbin.
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
import { add, getDay, getMonth, getYear, isLastDayOfMonth, sub } from "date-fns"; | |
import { chunk } from "lodash"; | |
import { Dispatch, SetStateAction, useState } from "react"; | |
type CalendarView = "month"; | |
type UseCalendarOptions = { | |
view: CalendarView; | |
/** | |
* Indicates if the week should start on Monday instead of Sunday. Defaults to starting on Sunday. |
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
g branch -D $(git remote prune origin | sed -e '1,2d' | sed -e 's/\ \* \[pruned\] origin\///' | paste -sd " " -) |
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
import _ from "lodash"; | |
/** | |
* jscodeshift codemod to rename Jest test files for classes from: | |
* ``` | |
* describe(MyCat, () => { | |
* describe("meow", () => { ... }); | |
* }); | |
* ``` | |
* to: |
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
@import "~@blueprintjs/core/lib/css/blueprint.css"; | |
@import "~@blueprintjs/icons/lib/css/blueprint-icons.css"; | |
/* just to make things neat and tidy */ | |
html, | |
body { | |
width: 100%; | |
height: 100%; | |
background: #efefef; | |
padding: 3em; |
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
echo Compiling... && javac LabZero.java && echo Compiled. && echo Running tests... && for i in $(seq 5); do java LabZero < TESTDATA$i.txt; done |
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
echo "Running $2 test cases for $1...\n\n" | |
for i in $(seq $2); | |
do echo "========== TEST CASE $i" | |
./a.out < $1$i.in > $1$i.out.actual | |
diff $1$i.out $1$i.out.actual | |
rm $1$i.out.actual; | |
done |
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
import Foundation | |
import Eureka // https://github.com/xmartlabs/Eureka | |
public extension Form { | |
public func valuesForFirebase(includeHidden: Bool = false) -> [String: Any?] { | |
let rows = includeHidden ? self.allRows : self.rows | |
return rows.filter({ $0.tag != nil }) | |
.reduce([:], { (dictionary, row) -> [String: Any?] in | |
var dictionary = dictionary | |
dictionary[row.tag!] = row.firebaseValue |
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
import Foundation | |
extension NSURL { | |
/** | |
Convenience class method for composing an `NSURL` for creating mail links with the `mailto` scheme. | |
- parameter receipients: Email receipients | |
- parameter cc: Email carbon copy receipients. (optional) | |
- parameter bcc: Email blind carbon copy receipients (optional) | |
- parameter subject: Subject title of the email (optional) |