Skip to content

Instantly share code, notes, and snippets.

View eyeezzi's full-sized avatar

Uzziah Eyee eyeezzi

View GitHub Profile
@eyeezzi
eyeezzi / read_generic_json.go
Last active January 3, 2018 03:37
How to Read Generic JSON in Golang.
package main
import (
"encoding/json"
"fmt"
)
func main() {
// Go stores JSON data as an array of bytes.
@eyeezzi
eyeezzi / autoHeightTableViewCell.swift
Last active January 9, 2017 23:29
UITableViewCell with automatic height using autolayout
/*
Ensure the cell has complete constraints from top to bottom, i.e all the subviews of the cell's contentView should have unambigous constraints from top to bottom.
*/
/* For UITableViews with Prototype cells */
// in viewDidLoad
self.tableView.rowHeight = UITableViewAutomaticDimension
self.tableView.estimatedRowHeight = 150 // an arbitrary number for estimation
@eyeezzi
eyeezzi / Elasticsearch_operations.json
Created December 6, 2016 02:27
Some operations on Elasticsearch using the Kibana Console query DSL
# the recommended way to do complex queries.
GET /firebase/event/_search
{
"query": {
"bool": {
"must": [
{ "multi_match": {
"query": "pride parade",
"fields": ["title", "description"]
}}
@eyeezzi
eyeezzi / swift_tasks
Last active September 20, 2016 21:53
// how to set status bar style for a view controller (not embedded in navController
override func preferredStatusBarStyle() -> UIStatusBarStyle {
// also set "view controller-based status bar style" to YES in Info.plist
return UIStatusBarStyle.LightContent
}
// setting apperance proxy for a UIControl
UISwitch.appearanceWhenContainedInInstancesOfClasses([CustomTableViewController.self]).thumbTintColor = UIColor.brownColor()
@eyeezzi
eyeezzi / 0_reuse_code.js
Created September 20, 2016 21:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@eyeezzi
eyeezzi / gist:e44491e1a62873e96f92
Last active August 29, 2015 14:26 — forked from alexmingoia/gist:4db967e5aeb31d84847c
Beyond Angular and Backbone with Undirectional apps

Beyond Angular and Backbone with Unidirectional apps

What is a unidirectional app?

Unidirectional is a term coined by React engineers to describe the data flow of an application. Unidirectional apps employ functional reactive programming techniques such as immutability, purity, and most importantly unidirectional (as opposed to bidirectional) data flow.

A unidirectional app is defined by no mutable references no two-way references between concerns.

Unidirectional app flowchart

BETHEA, Cooper. EXPERIENCES DEPLOYING MONGODB ON AWS. Disponí-
vel em: <http://www.mongodb.com/presentations/experiences-deploying-mongodb-aws>.
Acesso em: 17 de fevereiro de 2015.
COLEMAN, Tom. GREIF, Sasha. DISCOVER METEOR: Building Real-Time
JavaScript Web Apps. Disponível em: <https://book.discovermeteor.com/> Acesso em:
15 de março de 2015.
DEBERGALIS, Matt . Introducing DDP. Disponível em: <https://www.meteor.
com/blog/2012/03/21/introducing-ddp>. Acesso em: 15 de fevereiro de 2015.
@eyeezzi
eyeezzi / ndc-london-recordings.txt
Last active August 29, 2015 14:26 — forked from AlexArchive/ndc-london-recordings.txt
Powershell script to parse NDC London VODs prematurely
Capability Red - Requirements at Scale by Liz Keogh
http://www.ndcvideos.com/#/app/video/2111
----
Beyond Rectangles in Web Design - CSS Shapes and CSS Masking by Razvan Caliman
http://www.ndcvideos.com/#/app/video/2121
----
Coding Culture by Sven Peters
http://www.ndcvideos.com/#/app/video/2131
----
The Ultimate Logging Architecture - You KNOW You Want It by Michele Leroux Bustamante