Skip to content

Instantly share code, notes, and snippets.

View kenanchristian's full-sized avatar
👋

Christian Dimas kenanchristian

👋
View GitHub Profile
@kenanchristian
kenanchristian / giva-feedback.md
Last active February 1, 2021 17:06
Giva Feedback

Bugs

  1. Fix gender downcase on signup (OK)
  2. 403 / 500 error on donation_history (maybe new user / new install) -> Social Auth user, with no actual user created
    • Maybe social login user?
  3. Test social Auth same email validation (OK)
  4. Social Auth uses name as email (OK)
  5. Add exception for IG Auth users (OK)
  6. Add exception for find existing user on social auth (not by email) (OK)
  7. Add social_id column to user (OK)
@kenanchristian
kenanchristian / index.scss
Last active September 21, 2020 06:40
[[Adventure.co] Styling] Basic styling #writing #animation-transition
body, html {
margin: 0;
padding: 0;
font-size: 1rem;
font-family: "Montserrat";
font-weight: 300;
background-color: #FFFFFF;
}
.container {
@kenanchristian
kenanchristian / index.html
Last active September 21, 2020 06:40
[[Adventure.co] Template] Starting Template #writing #animation-transition
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Adventure Co.</title>
<link rel="stylesheet" href="./styles/index.css">
</head>
<body>
<main class="container">
@kenanchristian
kenanchristian / add-chalk-and-cli-progress.ts
Last active September 21, 2020 06:41
[[Typescript CLI] Add UX Improvements] Use Chalk & CLI Progress to improve experience #writing #cli #oclif
import {SingleBar, Presets} from 'cli-progress'
import {yellow, green, cyan} from 'chalk'
import {sleep} from '../lib/util'
interface PizzaData {
crust: string;
toppings: string[];
extraSauce: boolean;
count: number;
}
@kenanchristian
kenanchristian / optional-interactive.ts
Last active September 21, 2020 06:47
[[TypeScript CLI] Make Interactive Mode Optional] #cli #oclif
...
async getInteractiveArgs() {
const answer = await prompt([
{
type: 'number',
name: 'count',
message: 'How many pizza you want to create',
default: 1,
validate(value) {
import { prompt } from 'inquirer'
...
async run() {
const userInput = prompt([
{
type: 'number',
name: 'count',
async run() {
const {args, flags} = this.parse(Create)
this.log(JSON.stringify(args))
this.log(JSON.stringify(flags))
this.log('Your pizza is ready!')
}
static flags = {
help: flags.help({char: 'h'}),
crust: flags.string({char: 'c', description: 'Type of Crust (Thin/Thick)'}),
toppings: flags.string({char: 't', description: 'Toppings to add', options: ['pepperoni', 'mushroom', 'bacon', 'pineapple'], multiple: true}),
extraSauce: flags.boolean({char: 'x', description: 'Do you want extra sauce?'}),
}
static args = [
{
name: 'count',
static description = 'Create a new Pizza'
static examples = [
`$ pizza create
Your pizza is ready!
`,
]
/* eslint-disable no-await-in-loop */
import {Command, flags} from '@oclif/command'
import {prompt} from 'inquirer'
import {SingleBar, Presets} from 'cli-progress'
import {yellow, green, cyan} from 'chalk'
import {sleep} from '../lib/util'
interface PizzaData {
crust: string;
toppings: string[];