Skip to content

Instantly share code, notes, and snippets.


Doruk Kutlu d0ruk

  • İstanbul
View GitHub Profile
View webpack.config.js
const path = require("path");
const autoprefixer = require("autoprefixer");
const rucksack = require("rucksack-css");
const nested = require("postcss-nested");
const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const DashboardPlugin = require("webpack-dashboard/plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const CleanWebpackPlugin = require("clean-webpack-plugin");
d0ruk / HN_traverse_comments.js
Created Jul 18, 2017
async/await recursion
View HN_traverse_comments.js
import pMap from "p-map"
const endpoints = {
new: "",
top: "",
best: "",
item: id => `${id}.json`,
user: name => `${name}.json`,
View websocket-server.js
* Copyright (c) 2007-2013, Kaazing Corporation. All rights reserved.
// The Definitive Guide to HTML5 WebSocket
// Example WebSocket server
// See The WebSocket Protocol for the official specification
d0ruk /
Last active Apr 19, 2020
Sync your GitHub repo with

CodeSandbox(CSB) is an online React playground. One of the ways to add a project there is through importing from GitHub. Please sign in via GitHub.

This article will walk through the steps of sync'ing a create-react-app (CRA) project on a GitHub repo with a sandbox.

First, a quick recap of how to use CRA;

>> npm i -g create-react-app

>> create-react-app cra-app

d0ruk / aws-host-static.js
Last active Mar 9, 2020
AWS host static folder
View aws-host-static.js
const fs = require("fs");
const path = require("path");
const Promise = require("bluebird");
const readdir = require("recursive-readdir");
const { bgRed, bgGreen, bgBlue, bold, white } = require("chalk");
const PKG = require("./package.json");
const AWS = require("aws-sdk");
const s3 = new AWS.S3();
const bucketName = `${}-v${PKG.version}`;
d0ruk / cognito.yaml
Created Dec 2, 2017 — forked from singledigit/cognito.yaml
Create a Cognito Authentication Backend via CloudFormation
View cognito.yaml
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Type: String
Description: Unique Auth Name for Cognito Resources
# Creates a role that allows Cognito to send SNS messages

Quick Start with docker-compose

  • Add a new service in docker-compose.yml
version: '2'
     - NET_ADMIN
d0ruk / docker-compose.yml
Created Nov 27, 2018
nodemon with express+mongoose
View docker-compose.yml
version: "3"
image: mvertes/alpine-mongo
hostname: mongo
- 27017:27017
d0ruk / index.html
Last active Jun 27, 2020
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>react app</title>
<link href="" rel="stylesheet">
<link rel="stylesheet" href="">
d0ruk / cloudformation.yaml
Created Mar 21, 2019 — forked from alexjurkiewicz/cloudformation.yaml
Verdaccio CloudFormation template
View cloudformation.yaml
# Instructions:
# 1. Check all "TODO" comments and make changes if required for your environment
# 2. Provide values for all required parameters and any optional parameters desired
AWSTemplateFormatVersion: '2010-09-09'
Description: Verdaccio - NPM cache / private registry
Type: AWS::EC2::Image::Id
You can’t perform that action at this time.