Skip to content

Instantly share code, notes, and snippets.

View ibiwan's full-sized avatar

Jeremy "Ibi-Wan" Kent "...obi" ibiwan

View GitHub Profile
@ibiwan
ibiwan / react hook notes.md
Last active February 3, 2022 04:23
react hook notes

all hooks

  • start with use- prefix
  • always call in consistent order
    • no conditionals, no loops, no normal function calls
  • CAN call from within other hooks

useState

  • persists a value from render to render
  • providers a mutator to update value and trigger re-render
  • no automatic recompute
<div class="container">
<div class="row">
<div class="col-sm">
<div class="card text-white bg-secondary">
<div class="card-body">
<h5 class="card-title">Label</h5>
<div class="card-text">Input</div>
</div>
</div>
</div>
$connectedAccount->persons()->create(
[
'first_name' => 'sue',
'last_name' => 'cash',
'gender' => 'male',
'dob' => [
'day' => 24,
'month' => 02,
'year' => 1969,
],
@ibiwan
ibiwan / create_external_account.php
Created February 27, 2019 20:34
how to create external account with stripe-php library? getting error: "Error: Call to a member function create() on null
<?php
Stripe::setApiKey(static::$stripeApiKey);
$sourceAccount = new Account();
$sourceAccount->updateAttributes(
[
'type' => 'standard',
'email' => uniqid() . '@dard.stan',
'country' => 'ca',
{"boards":{"test-board-0":{"threads":{"test-board-0-thread-0":{"thread_text":"test-board-0-thread-0","thread_pass":"test-board-0-thread-pass-0","replies":{"test-board-0-thread-0-reply-0":{"reply_text":"test-board-0-thread-0-reply-0","reply_pass":"test-board-0-thread-0-reply-pass-0","replyId":"5c0246026e018e65939e0f89"},"test-board-0-thread-0-reply-1":{"reply_text":"test-board-0-thread-0-reply-1","reply_pass":"test-board-0-thread-0-reply-pass-1","replyId":"5c0246026e018e65939e0f8a"},"test-board-0-thread-0-reply-2":{"reply_text":"test-board-0-thread-0-reply-2","reply_pass":"test-board-0-thread-0-reply-pass-2","replyId":"5c0246026e018e65939e0f8b"},"test-board-0-thread-0-reply-3":{"reply_text":"test-board-0-thread-0-reply-3","reply_pass":"test-board-0-thread-0-reply-pass-3","replyId":"5c0246026e018e65939e0f8c"},"test-board-0-thread-0-reply-4":{"reply_text":"test-board-0-thread-0-reply-4","reply_pass":"test-board-0-thread-0-reply-pass-4","replyId":"5c0246026e018e65939e0f8d"}}},"test-board-0-thread-1":{"thread_text
@ibiwan
ibiwan / skeleton-daemon.sh
Created June 12, 2018 21:47 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"
Promise
.all([])
.then(() =>
orm.model('Event').create(
{
/* some data here */
}
)
)
.then(() =>

I am adding details to this list as I have time, refresh every so often to see what else I've added!

Petition [60777], [60778] - Equal Rights

  • "we are committed to opposing and speaking out against any form of violence, coercion, ridicule, stigmatization or marginalization directed toward individuals who self-identify as either homosexual or former homosexual or as LGBT or ex-gay."
  • "We see a clear issue of simple justice in protecting the rightful claims of ... civil marriage, civil unions"
  • "It is now time for The United Methodist Church to fully embrace and accept members of the denomination regardless of sexual orientation or gender identity."
function bouncer(arr){
return arr.filter(
function (element) {
if(
element === false ||
element === null ||
element === undefined ||
element !== element || // tests for NaN
element === '' ||
  • MASTER with tags before every set of commits, matches code on production server
  • STAGING with tags, with code that has already been tested POST merge
  • FEATURE branches with feature/ prefix
  1. features branched from master
  2. dev work happens in feature branch
  3. non-VM testing happens in dev-controlled test environments on full servers
  4. BACK-merge master to feature branch if it has changes
  5. test MERGED feature branch in dev local VM and personal server test environment
  6. create tag on staging branch (formatted as below)