I hereby claim:
- I am bpicolo on github.
- I am bpicolo (https://keybase.io/bpicolo) on keybase.
- I have a public key ASAuNpZ-nmZaYiXMA6pgf1RGu4GNU0Am51G-XoFdwIejBQo
To claim this, I am signing this object:
/** | |
* I'm not a fan of Auth0's suggested implementation for Javascript presentation frameworks - | |
* they tie in too directly (using Vue lifecycle hooks, React useEffect). | |
* This leads to having to restructure your entire app around your authentication implementation | |
* | |
* React and Vue primarily serve as presentation layers, but your application domain logic often | |
* can and should live outside of your presentation layer. This makes authenticating with Vue lifecycle hooks | |
* or useEffect an antipattern for me, because it leads to either parameter drilling down to your business logic, | |
* or race conditions between your business logic and view lifecycles. | |
* |
def pipe(arg, *fns): | |
out = arg | |
for fn in fns: | |
out = fn(out) | |
return out | |
result = pipe( | |
1, | |
lambda x: x + 2, |
I hereby claim:
To claim this, I am signing this object:
- id: gofmt | |
name: gofmt | |
entry: gofmt | |
description: gofmt delivered via docker | |
language: docker | |
files: \.go$ |
using UnityEngine; | |
using UnityEngine.UI; | |
using System.Collections; | |
/** | |
* Scale a GridLayoutGroup according to resolution, etc. | |
* This is using width-constrained layout | |
*/ | |
public class GridScalar : MonoBehaviour { |
using UnityEngine; | |
using System; | |
[RequireComponent(typeof(CharacterController))] | |
public static class CharacterMover | |
{ | |
public static void ProgressMovement (CharacterController cc, Vector3 destination, float speed, float turnSpeed) | |
{ | |
if (cc.transform.position == destination) { | |
return; |
# -*- coding: utf-8 -*- | |
from pyramid.httpexceptions import HTTPMovedPermanently | |
from urllib.parse import urlunparse | |
from urllib.parse import urlparse | |
def trailing_slash_tween(handler, registry): | |
"""Redirect any route ending with a / to not have a slash.""" | |
def tween(request): |
(defn vec-to-map [k vect] | |
;; Given a key function, k, of 1 arg | |
;; create a mapping from key->item | |
;; for the items in a vector | |
(into {} (map (juxt k identity) vect))) |
sub: | |
(register-sub | |
:tags | |
(fn [db _] | |
(reaction (vals (:tags @db))))) | |
handler: | |
(register-handler | |
:add-tag | |
(fn [db [text]] |
$entity = new Entities\Foo(); | |
$entity->setField('foo'); | |
$em->persist($entity); | |
$em->flush(); | |
... | |
... | |
$entity->setField('bar'); | |
$em->getRepository('Entities\Foo')->find(the_id)->getField() // foo |