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 / docker-compose.yml
Created February 18, 2018 12:56
Rails docker compose
version: '3'
services:
db:
image: postgres
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/app
ports:
@wayanjimmy
wayanjimmy / .some-neutrino-config.js
Created February 21, 2018 06:08
Some neutrino config
const { ProvidePlugin } = require('webpack');
const path = require('path');
module.exports = {
use: [
[
'@neutrinojs/react',
{
html: {
title: 'sherly-married'
@wayanjimmy
wayanjimmy / Fetch.js
Created March 17, 2018 12:18
Fetch as a component
import React from 'react'
import PropTypes from 'prop-types'
import { request } from '../api'
class Fetch extends React.Component {
static propTypes = {
url: PropTypes.string.isRequired,
render: PropTypes.func.isRequired,
loader: PropTypes.element,
@wayanjimmy
wayanjimmy / .neutrinorc.js
Created March 27, 2018 09:06
Neutrino react 15.3.2
const { merge } = require('@neutrinojs/compile-loader');
const { ProvidePlugin } = require('webpack');
const env = require('@neutrinojs/env');
module.exports = {
use: [
[
'@neutrinojs/react',
{
html: {
@wayanjimmy
wayanjimmy / Dockerfile
Created April 18, 2018 00:58
Rails Docker
FROM ruby:2.5.1
ENV LANG C.UTF-8
RUN apt-get update -qq && apt-get install -y build-essential mysql-client
RUN mkdir /workspace
WORKDIR /workspace
ADD Gemfile /workspace/Gemfile
ADD Gemfile.lock /workspace/Gemfile.lock
RUN bundle install
@wayanjimmy
wayanjimmy / react-compound-component.js
Created May 18, 2018 06:38
React compund component
render() {
const children = React.Children.map(this.props.children, (child, index) => {
if (child.type === Panels) {
return React.cloneElement(child, {
activeIndex: this.state.activeIndex
});
} else if (child.type === List) {
return React.cloneElement(child, {
activeIndex: this.state.activeIndex,
onActivateTab: activeIndex => {
@wayanjimmy
wayanjimmy / Dockerfile
Created June 7, 2018 01:51
Laravel Docker php7.2, mail testing, adminer and s3 mock using minio
FROM php:7.2-fpm
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libpq-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
#Get Composer
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
@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

@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": {