Skip to content

Instantly share code, notes, and snippets.

View slopeofhope81's full-sized avatar

Steve Lim slopeofhope81

View GitHub Profile
@slopeofhope81
slopeofhope81 / adapter.py
Created December 12, 2018 21:29 — forked from pazdera/adapter.py
Example of `adapter' design pattern in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of `adapter' design pattern
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
import React, { Component } from 'react';
import { reduxForm, Field } from 'redux-form';
class Signin extends Component {
onSubmit({ email, password }) {
console.log(email);
console.log(password);
}
renderField(field) {
@slopeofhope81
slopeofhope81 / .eslintrc.json
Created March 21, 2018 09:59 — forked from coryhouse/.eslintrc.json
.eslintrc.json file for "Building a JavaScript Development" Pluralsight course
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings"
],
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module"
//require("babel-register");
//module.exports = require("./webpack.config.babel");
import webpack from "webpack";
import path from 'path';
import CleanWebpackPlugin from 'clean-webpack-plugin';
import HtmlWebpackPlugin from "html-webpack-plugin";
@slopeofhope81
slopeofhope81 / package.json
Last active May 11, 2018 23:46 — forked from coryhouse/package.json
package.json
{
"name": "application",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"dev": "nodemon server.js",
"build": "webpack",
"start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --port 8000",
"test": "jest",
@slopeofhope81
slopeofhope81 / userAvatar.js
Created March 8, 2018 21:52 — forked from SylarRuby/userAvatar.js
NodeJs AWS S3 Upload
/**
* This gist was inspired from https://gist.github.com/homam/8646090 which I wanted to work when uploading an image from
* a base64 string.
* This code is used in my startup, Zired.
* Web: http://zired.io
*/
// You can either "yarn add aws-sdk" or "npm i aws-sdk"
const AWS = require('aws-sdk')
# This tells kubecfg to read its config from the local directory
export KUBECONFIG=./kubeconfig
# Looking at the cluster
kubectl get nodes
kubectl get pods --namespace=kube-system
# Running a single pod
kubectl run --generator=run-pod/v1 --image=gcr.io/kuar-demo/kuard-amd64:1 kuard
kubectl get pods
@slopeofhope81
slopeofhope81 / README.md
Created February 5, 2018 21:32
Sequelize + Express + Migrations + Seed Starter