This file contains 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 { createApp, addLayer, init } from "libs/venuebook/app"; | |
import { reducer, epic } from "app/planner/onboarding/store/use_cases"; | |
createApp({ | |
name: "onboarding", | |
// Route is not needed yet but will be required for micro-service frontend | |
route: "/signup/venue/onboarding/", | |
}); | |
// Simpler View -> Store -> Render Architecture |
This file contains 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
# What is the best way to format this multi-line Python code? | |
############################################################# | |
self.queryset = self.queryset.filter( | |
Q( | |
name__istartswith=self.query_params.get('name') | |
) | Q( | |
venues__name__istartwith=self.query_params.get('name') | |
) | |
) |
This file contains 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 { of } from "rxjs/observable"; | |
import { filter, map } from "rxjs/operators"; | |
import validate, * as v from "libs/validate"; | |
const validateForm = validate([ | |
v.field("name", "Full Name", [ | |
v.isRequired, | |
"A full name is required.", | |
name => name.split(" ").length, | |
wordCount => wordCount < 2, |
This file contains 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
function getURL (a) { | |
return a.href; | |
} | |
function openLink (url, i) { | |
window.open(url, `_book_${i}`); | |
window.confirm('Ready to continue?'); | |
} | |
Array |
This file contains 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
(ns async-reddit | |
(:require [reddit :refer [get-reddit-posts]] | |
[clojure.core.async :as async])) | |
(defn get-post-link | |
[post] | |
(str "https://reddit.com" (:permalink post))) | |
(defn get-post-footer | |
[post] |
This file contains 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
#!/usr/bin/env node | |
const path = require('path'); | |
const gulp = require('gulp'); | |
const zip = require('gulp-zip'); | |
const filter = require('gulp-filter'); | |
// Resolve to absolute filenames relative to the direct the script is run in | |
function relative (filepath) { | |
return path.relative(process.cwd(), filepath); |
This file contains 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
this.box$ = Rx.Observable.fromEvent(content, 'mousedown') | |
// only take primary mouse button clicks | |
.filter(e => e.which === 1) | |
// only continue if the user is clicking on a drawn box or the drawing canvas | |
.filter(R.anyPass([ | |
e => e.target.className.includes('box'), | |
e => e.target.className.includes('canvas__content'), | |
])) | |
// kill the previous stream when a passing event is emitted | |
.switchMap(start => Rx.Observable.of(start) |
This file contains 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
let data = [ | |
{ | |
label: 'Food', | |
value: 1, | |
}, | |
{ | |
label: 'Hors D\'Ouvers', | |
value: 2, | |
}, | |
{ |
This file contains 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
/** | |
* Wraps the given callback in a promise | |
* @param {function} callback - Callback to call & wrap in a promise | |
* @param {...*} args - Arguments to send to the callback. Send the promise | |
* method to prefil arguments. | |
* @returns {promise} A promise resolved when callback is fired | |
* @example | |
* return promise(this.setState, data); | |
* return promise(setTimeout, promise, 500); | |
*/ |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- Generated by: TmTheme-Editor --> | |
<!-- ============================================ --> | |
<!-- app: http://tmtheme-editor.herokuapp.com --> | |
<!-- code: https://github.com/aziz/tmTheme-Editor --> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>duuuuude</string> |