Skip to content

Instantly share code, notes, and snippets.

Avatar
🤘
UIs for the APIs

Rob Phoenix robphoenix

🤘
UIs for the APIs
View GitHub Profile
@robphoenix
robphoenix / flex.tsx
Created Dec 9, 2019
react flexbox component with as prop
View flex.tsx
/** @jsx jsx */
import { jsx } from '@emotion/core'
import React from 'react'
const Flex: React.FC<{
as?: React.ReactType
row?: boolean
column?: boolean
}> = ({ as: Component = `div`, row, column }) => {
const flexDirection = row ? 'row' : column ? 'column' : ''
View in-memory-data.service.ts
import { InMemoryDbService } from 'angular-in-memory-web-api'
import { Hero } from './hero'
export class InMemoryDataService implements InMemoryDbService {
createDb() {
const heroes = [
{ id: 11, name: 'Mr. Nice' },
{ id: 12, name: 'Narco' },
{ id: 13, name: 'Bombasto' },
{ id: 14, name: 'Celeritas' },
View reggae-reggae.json
{
"Reggae": [
"The Abyssinians",
"The Aces",
"Glen Adams",
"Admiral T",
"Yasus Afari",
"African Brothers",
"The Aggrovators",
"Aisha",
@robphoenix
robphoenix / cloudSettings
Last active Apr 21, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-04-21T08:22:13.740Z","extensionVersion":"v3.2.8"}
@robphoenix
robphoenix / cloudSettings
Last active Jan 7, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-01-07T09:10:24.054Z","extensionVersion":"v3.2.4"}
View xgo.sh
#!/bin/bash
for dir in ./exercises/*/
do
dir=${dir%*/}
file="$dir/example_gen.go"
if [ -f "$file" ]; then
metadir="${dir}/.meta/"
mkdir -p "${metadir}"
mv "$file" "${metadir}gen.go"
fi
View ios_command_example
---
- name: Create tmp Directory
hosts: 127.0.0.1
connection: local
tasks:
- name: Create tmp Directory
file: path=../../tmp state=directory
View keybase.md

Keybase proof

I hereby claim:

  • I am robphoenix on github.
  • I am robphoenix (https://keybase.io/robphoenix) on keybase.
  • I have a public key ASB-aboRV_tyb6roe20y1_L98XiAAecN-rU421MRxMW7ywo

To claim this, I am signing this object:

@robphoenix
robphoenix / i3.md
Last active Jun 14, 2021
i3 cheat sheet
View i3.md

mod + Enter - open terminal

mod + v - split vertically

mod + h - split horizontally

mod + Shift + q - close window

mod + d - open dmenu

View compile_string.md
iex> string = "Hello, <%= 2 + 2 %>!"
"Hello, <%= 2 + 2 %>!"
iex(55)> EEx.compile_string string
{:<>, [context: EEx.Engine, import: Kernel],
 [{:__block__, [],
   [{:=, [],
     [{:tmp1, [], EEx.Engine},
      {:<>, [context: EEx.Engine, import: Kernel], ["", "Hello, "]}]},
    {:<>, [context: EEx.Engine, import: Kernel],