Skip to content

Instantly share code, notes, and snippets.

View tonysherbondy's full-sized avatar

Anthony Sherbondy tonysherbondy

  • San Francisco, CA
View GitHub Profile
@tonysherbondy
tonysherbondy / example_observer.cljs
Created June 27, 2018 04:12
Show motivating example for reg-obs
(db-utils/reg-obs
::obs-for-new-smart-boost
[[::routes/route]
[::working-boost]]
(fn [route working-boost]
(cond
(and (= (:handler route) :manage/content-two-new-smart-boost)
(not working-boost))
(rf/dispatch [::set-working-boost {:smart-boost-id (random-uuid)
:name "My SmartBoost"
" ---------------
" Searching
" ---------------
set ignorecase " Case insensitive search
set smartcase " Non-case sensitive search
set incsearch " Incremental search
set hlsearch " Highlight search results
" ---------------
" Extensions
// 2.2
import { AppRegistry } from 'react-native'
import App from './App.react'
AppRegistry.registerComponent('YOUR_PROJECT_NAME', () => App)
// 4.2
propTypes = {
post: PropTypes.shape({
imageURL: PropTypes.string.isRequired,
caption: PropTypes.string.isRequired,
const convertHtmlToPlainText = html => {
const dict = {
gt: '>',
hellip: '...',
ldquo: '"',
rdquo: '"',
lsquo: "'",
rsquo: "'",
ndash: '-',
}
{
"propositions": [
{
"name": "",
"imageUrl": "https://ballot.fyi/static/img/index/schoolbus.png",
"subTitle": "Fiscally, the biggest measure on the ballot. $9B + $8B interest.",
"url": "https://ballot.fyi/51",
"propCode": "51",
"color": "rgb(238, 138, 50)",
"title": "Prop 51 makes $9B to build and improve schools"
@tonysherbondy
tonysherbondy / SearchBarFinish.js
Created July 24, 2016 03:46
Final implementation of simple Search Bar for React Native
import React from 'react'
import {
View,
ListView,
Text,
StyleSheet,
TextInput,
} from 'react-native'
import names from './names'
@tonysherbondy
tonysherbondy / SearchBarStart.js
Last active July 24, 2016 03:23
Start of implementing Search Bar in React Native Guide
import React from 'react'
import {
View,
ListView,
Text,
StyleSheet,
} from 'react-native'
import names from './names'
const styles = StyleSheet.create({
@tonysherbondy
tonysherbondy / _.md
Last active August 29, 2015 14:07
judgey
@tonysherbondy
tonysherbondy / prototypeCellWoes.m
Created March 21, 2014 03:31
How I'm instantiating my prototype cell and causing an infinite loop
-(ResultTableViewCell *)prototypeResultCell
{
// lazily instantiate and hold onto the prototype
if (!_prototypeResultCell) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
_prototypeResultCell = [self.tableView dequeueReusableCellWithIdentifier:@"ResultTableViewCell" forIndexPath:indexPath];
}
return _prototypeResultCell;
}