Skip to content

Instantly share code, notes, and snippets.

Avatar

Lamour LamourBt

  • NY
View GitHub Profile
@LamourBt
LamourBt / Fastfile
Created Sep 18, 2018 — forked from polbins/Fastfile
Fastlane script for Uploading to Slack and Play Store Alpha
View Fastfile
default_platform :android
platform :android do
before_all do
ENV["SLACK_URL"] = "https://hooks.slack.com/services/ABC/123/XYZ"
end
######################### PUBLIC LANES #########################
desc "Deploy a new Prod APK version to Play Store Alpha"
@LamourBt
LamourBt / RxJava.md
Created Aug 28, 2018 — forked from cesarferreira/RxJava.md
Party tricks with RxJava, RxAndroid & Retrolambda
View RxJava.md

View Click

Instead of the verbose setOnClickListener:

RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));

Filter even numbers

Observable
    .just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
View rx_intro.swift
import Foundation
import RxSwift
import PlaygroundSupport
PlaygroundPage.current.needsIndefiniteExecution = true
class TryOut {
private var timer: Timer!
private let data = Array<Int>(1...5) // data to broadcast asynchronously
@LamourBt
LamourBt / introrx.md
Created Mar 28, 2018 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
View functors1.swift
/*
An Object is considered to be a **functor** when it implements fmap (fmap referring to functor map not flatmap)
-[Rules] This fmap should
* preserve Identity (x to y) and (y to x ) should be the same value every time
* and be composable
map isn't fmap but fmap can do what map does
map only operates on pure function, where fmap is lifted that pure function to operate on functor type
*/
@LamourBt
LamourBt / resetAllSimulators.sh
Created Jan 17, 2018 — forked from ZevEisenberg/resetAllSimulators.sh
Reset all iOS simulators with this one weird trick
View resetAllSimulators.sh
osascript -e 'tell application "iOS Simulator" to quit'
osascript -e 'tell application "Simulator" to quit'
xcrun simctl erase all
@LamourBt
LamourBt / redux.swift
Created Oct 26, 2017
Redux Architecture in iOS
View redux.swift
import PlaygroundSupport
import Foundation
import UIKit
PlaygroundPage.current.needsIndefiniteExecution = true
//data model
struct User {
let name:String
}
enum Result<T> {
@LamourBt
LamourBt / ultimate-ut-cheat-sheet.md
Created Mar 19, 2017 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon
View ultimate-ut-cheat-sheet.md

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@LamourBt
LamourBt / ultimate-ut-cheat-sheet.md
Created Mar 19, 2017 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon
View ultimate-ut-cheat-sheet.md

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@LamourBt
LamourBt / gist:130e5d2479893fef8d83b45ede7655f2
Created Jul 15, 2016
Facebook Login Swift 2.0 and Parse-Server (latest version)
View gist:130e5d2479893fef8d83b45ede7655f2
// Mark: -Facebook
func loginWithFaceBookInBackground(sender:UIButton) {
let permissions = ["public_profile", "email"]
PFFacebookUtils.logInInBackgroundWithReadPermissions(permissions) { (_user:PFUser?, _error:NSError?) in
if _error == nil {
if let possibleUser = _user{
print("\(possibleUser.sessionToken) , \(possibleUser)")
if possibleUser.isNew {
self.accessingFacebookCredentialsToSaveToParse()