Skip to content

Instantly share code, notes, and snippets.

View aphillipo's full-sized avatar
🌴
Let's build something....

Andrew Phillipo aphillipo

🌴
Let's build something....
View GitHub Profile
@aphillipo
aphillipo / mixpanel_proxy_controller.ex
Last active September 13, 2022 18:47
Mix Panel Proxy to stop ad blockers while still allowing tracking. Transliterated from https://github.com/mixpanel/flask-tracking-proxy
defmodule HelloWeb.MixPanelProxyController do
use HelloWeb, :controller
@excluded_headers [
"content-encoding",
"content-length",
"transfer-encoding",
"connection",
"access-control-allow-credentials",
"access-control-allow-origin"
@aphillipo
aphillipo / apple_ui_failures.md
Last active June 11, 2017 06:48
List of UI Issues with Apple Products

Apple List of UI Issues

I'm going to document a list of issues Apple have on this new Macbook Pro. It's all opinion based and I'm pretty happy if you disagree and explain to me how I'm wrong.

macOS

There should a be a small delay between typing and touchpad presses

  1. On older versions of macOS there was a delay between typing and the touchpad.
  2. This means while typing 3-4 times per day I accidentally touch the trackpad causing text to be typed in another part of my editor.
== Compilation error on file test/support/factory.ex ==
** (ArgumentError) argument error
(stdlib) erl_anno.erl:318: :erl_anno.set(:file, 'nofile', -1)
(stdlib) erl_parse.yrl:1516: anonymous fn/3 in :erl_parse.map_anno/2
(stdlib) erl_parse.yrl:1631: :erl_parse.modify_anno1/3
(stdlib) erl_parse.yrl:1517: :erl_parse.map_anno/2
(stdlib) erl_lint.erl:703: :erl_lint."-set_file/2-lc$^0/1-0-"/2
(stdlib) erl_lint.erl:448: :erl_lint.exprs_opt/3
(stdlib) erl_eval.erl:173: :erl_eval.check_command/2
flex-flow: column-reverse wrap-reverse;
justify-content: center;
align-content: space-between;
@aphillipo
aphillipo / MainApp.js
Created October 5, 2015 19:26
Wrapping React Native Navigator
class MainApp extends Component {
constructor(props) {
super(props);
}
renderScene(route, navigator) {
var Component = route.component;
return (
<Component route={route} navigator={navigator} />
);
@aphillipo
aphillipo / gist:db2d39711c919c155c9e
Created April 22, 2015 22:18
Celery Repetition
23:10:22 celery.1 | [2015-04-22 23:10:22,625: DEBUG/MainProcess] basic.qos: prefetch_count->5
23:10:22 celery.1 | [2015-04-22 23:10:22,627: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x104c88e60> (args:(u'celery.chord_unlock', u'56b77008-7ba9-47c3-bbe1-6b9414955ed0', {u'utc': True, u'chord': None, 'group': None, u'args': [u'1c9ee913-4315-4adf-8a39-3f2d21e7ce95', {u'chord_size': 3, u'task': u'dave.test_types.vulnerability_assessment.finished', u'args': [], u'options': {u'reply_to': u'c1f12289-2746-330e-bd99-d16d3894b7f5', u'task_id': u'd9cd043e-c436-479b-bf11-fe97339f6758', u'root_id': None}, u'subtask_type': None, u'kwargs': {u'test_id': 46}, u'immutable': False}], u'retries': 0, u'delivery_info': {u'priority': None, u'redelivered': False, u'routing_key': u'celery', u'exchange': u'celery'}, u'expires': None, u'task': u'celery.chord_unlock', u'callbacks': None, u'correlation_id': '56b77008-7ba9-47c3-bbe1-6b9414955ed0', u'errbacks': None, u'timelimit': [None, None], u'taskset': None, u'kwa
@aphillipo
aphillipo / gist:2b401a42b583ff900ba0
Created March 9, 2015 17:32
Bootstrap3 Jinja 2 WTForms Macros with Recursive Form Field rendering.
{# Renders field for bootstrap 3 standards.
Params:
field - WTForm field
kwargs - pass any arguments you want in order to put them into the html attributes.
There are few exceptions: for - for_, class - class_, class__ - class_
Example usage:
{{ macros.render_field(form.email, placeholder='Input email', type='email') }}
#}