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 / 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 / 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 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 / .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 / 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 / .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 / 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 / Dockerfile
Created February 17, 2018 15:22
Dockerfile rails dev
FROM ruby:2.5.0-alpine
RUN apk update && apk add nodejs build-base libxml2-dev libxslt-dev postgresql postgresql-dev
RUN mkdir /app
WORKDIR /app
COPY Gemfile ./Gemfile
COPY Gemfile.lock ./Gemfile.lock
RUN bundle install -j 20
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="Your SSID Here"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="YourPresharedKeyHere"

Keybase proof

I hereby claim:

  • I am wayanjimmy on github.
  • I am wayanjimmy (https://keybase.io/wayanjimmy) on keybase.
  • I have a public key ASDx_T8HYMbbISEOLAb7ZzWRYpp30e3tMkhW4cH_-8o0mAo

To claim this, I am signing this object: