Skip to content

Instantly share code, notes, and snippets.

View wayanjimmy's full-sized avatar
🏠
Working from home

Wayan jimmy wayanjimmy

🏠
Working from home
View GitHub Profile
@wayanjimmy
wayanjimmy / HistoryPanel.js
Created February 21, 2019 04:01
HistoryPanel
import React, {Component} from "react"
const dateTimeFormat = "DD/MM/YYYY h:mm:ss a"
function HistoryRows({histories}) {
return histories.map((data, index) => (
<tr key={index}>
<td>{data.message}</td>
<td>{moment(data.createdAt).format(dateTimeFormat)}</td>
<td>{data.createdBy}</td>
@wayanjimmy
wayanjimmy / MediaUploader.js
Created February 21, 2019 03:42
Media Uploader component
// @flow
import React from 'react';
import DropzoneComponent from 'react-dropzone-component';
import type {DropzoneState, DropzoneMedia} from 'react-dropzone-component';
import 'react-dropzone-component/styles/filepicker.css';
//$FlowFixMe
import 'dropzone/dist/min/dropzone.min.css';
import type {Media} from '../types/media';
@wayanjimmy
wayanjimmy / Dockerfile
Last active March 11, 2019 02:47
Laravel Docker Permission Error
FROM php:7.3-fpm
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libpq-dev libzip-dev git\
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mbstring pdo pdo_mysql pdo_pgsql zip bcmath exif
#Get Composer
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
@wayanjimmy
wayanjimmy / soFetch.js
Created November 30, 2018 02:41
Reusable fetch function from wesbos
// https://twitter.com/wesbos/status/1063515277911052290/photo/1
async function soFetch(input, settings = {}) {
const response = await fetch(input, {
headers: {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json'
},
...settings
});
@wayanjimmy
wayanjimmy / Dockerfile
Created November 9, 2018 23:21
Rails 5.2.1 + Ruby 2.5.3
FROM ruby:2.5.3
# Make nodejs and yarn as dependencies
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# Install dependencies and perform clean-up
RUN apt-get update -qq && apt-get install -y \
build-essential \
@wayanjimmy
wayanjimmy / products.json
Last active September 30, 2018 05:27
Product List
[{"id":1,"name":"Sepatu Converse","price":3050,"desc":"aman","imageSrc":"https://images.nike.com/is/image/DotCom/PDP_HERO/132170C_001_A_PREM/converse-chuck-taylor-all-star-leather-unisex-high-top-shoe.jpg"},{"id":2,"name":"Vans","price":2000,"desc":"aman","imageSrc":"https://media.journeys.com/images/products/1_259094_ZM.JPG"},{"id":3,"name":"New Balance","price":550,"desc":"aman","imageSrc":"https://media.endclothing.com/media/f_auto,q_auto,w_760,h_760/prodmedia/media/catalog/product/0/5/05-07-2017_newbalance_u520avintage_blue_u520ab_eh_1.jpg"}]
@wayanjimmy
wayanjimmy / logslaravel.sh
Last active September 18, 2018 02:36 — forked from jakebathman/logslaravel.sh
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E -C 4 \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@wayanjimmy
wayanjimmy / Faskes BPJS.postman_collection.json
Created August 30, 2018 07:05
Faskes BPJS Postman Collection
{
"info": {
"_postman_id": "692adab9-f9a9-48e0-8452-08ba65e36958",
"name": "Faskes BPJS",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Provinces list",
"request": {
@wayanjimmy
wayanjimmy / workshop-devcbali-coding-fundamental-js.md
Last active July 28, 2018 00:20
Workshop Dev Circle Bali - Coding Fundamental with Javascript

Git

Git adalah salah satu VCS (Version Control System)

  • Mengatur versi source code
  • Menambahkan checkpoint
  • Git bekerja secara local

Instalasi