Skip to content

Instantly share code, notes, and snippets.

View heloa-net's full-sized avatar

heloa-net

View GitHub Profile
@heloa-net
heloa-net / hello.py
Created March 19, 2023 15:58
Hello World - Python
def hello():
return "Hello World!"
hello()
This product is meant for educational purposes only. Any resemblance to real persons, living or dead is purely coincidental. Void where prohibited. Some assembly required. List each check separately by bank number. Batteries not included.
Contents may settle during shipment. Use only as directed. No other warranty expressed or implied. Do not use while operating a motor vehicle or heavy equipment. Postage will be paid by addressee. Subject to CARB approval.
This is not an offer to sell securities. Apply only to affected area. May be too intense for some viewers. Do not stamp. Not rated by the Motion Picture Association of America. Call for nutritional information. Use other side for additional listings.
Printed on recycled paper. For recreational use only. Do not disturb. All models over 18 years of age. Prize not redeemable for cash value. If condition persists, consult your physician. No user-serviceable parts inside. Freshest if eaten before date on carton.
To be used as a supplementary restraint system on
@heloa-net
heloa-net / .zshrc
Created June 8, 2017 13:57
oh-my-zsh configuration file
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/USER/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
@heloa-net
heloa-net / on-jsx.markdown
Created March 30, 2017 21:40 — forked from chantastic/on-jsx.markdown
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I lead the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can'

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
ReactWrapper {
component: null,
root:
ReactWrapper {
component:
ReactClassComponent {
setChildProps: [Object],
setChildContext: [Object],
getInstance: [Object],
getWrappedComponent: [Object],
@heloa-net
heloa-net / reduxFormComponents.js
Created February 3, 2017 15:27
Special input field for Redux-Form
const renderSpecialInput = ({ input, label, type, meta: { touched, error }, divClass, icon, position = 'before' }) => (
<div className={divClass ? divClass : ""}>
<label>{label}</label>
<div className="input-group">
{icon && position === 'before' &&
<span className="input-group-label">{icon}</span>
}
<input {...input} type={type} placeholder={label} className="input-group-field" />
{touched && error && <span className="form-error is-visible">{error}</span>}
{icon && position === 'after' &&
@heloa-net
heloa-net / rules.json
Last active January 7, 2017 23:55
Firebase db rules for social app with profiles and posts
{
"rules": {
".read": true,
"profiles": {
"$user_id": {
".read": true,
".write": "$user_id === auth.uid"
}
},
@heloa-net
heloa-net / learning.md
Last active January 4, 2017 20:27 — forked from sibelius/learning.md
Learning Path React Native

Basics

  • Learn how to start a new react native project
  • Run it on ios simulator, on android emulator, on a real iPhone device and on a real Android device, with and without debugging enabled.
  • Learn how to upgrade a react native project
  • Learn how to add a package to the project
  • Learn how to add a package that has a native dependency (https://github.com/airbnb/react-native-maps, https://github.com/evollu/react-native-fcm) - DO NOT USE COCOAPODS

Learn Navigation

@heloa-net
heloa-net / How-to.md
Created January 4, 2017 01:58
Hiding API keys on GitHub without breaking your project

Backup the API key beforehand in case you have trouble reverting the file.

Let's say the file with a key you want to hide is <filename> Open it and change the API key with a placeholder, like <api-key> Save and add the file to git and commit git commit -m 'Masking API key'

Then revert the file, undoing recent changes so your key is back where it should be and save it. Use git update-index --assume-unchanged