Skip to content

Instantly share code, notes, and snippets.

View james075's full-sized avatar
:electron:

James Heng james075

:electron:
View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active October 13, 2025 23:10
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@NicolasRitouet
NicolasRitouet / cd-aws-s3-wercker.md
Last active June 13, 2018 19:03
How to automate deployment on AWS S3 with bitbucket (or github) and wercker

This tutorial explains how to deploy automatically from bitbucket (or github) to AWS S3.

Create a bitbucket repository (public or private).

Add this repo on Wercker

  • Go to Create Application
  • Select use bitbucket (or github)
  • Choose your repo
  • For the next questions, choose the default answers
@NicolasRitouet
NicolasRitouet / host-aws-s3-domain-name.md
Last active April 25, 2022 11:21
Host your static website on AWS S3 and map your custom domain name on Gandi

This tutorial explains how to host your static website on Amazon Web Service S3 with your custom domain name on gandi (or on any other registrar).

Create a bucket on AWS s3 on the closest region (Frankfurt for Europeans).

The name of the bucket should be your domain name: example.com

Enable website hosting

Go to bucket properties, then Static website hosting and select enable website hosting. Index document should be index.html. Click save

@deltheil
deltheil / build-cfsm.sh
Last active August 29, 2015 14:03
cfsm - Finite State Machine compiler
# -------
# cfsm
# -------
# see: http://www.mindrot.org/projects/cfsm/
# Build (tested on Mac OS X 10.9.3)
cvs -d :ext:anoncvs@anoncvs.mindrot.org:/cvs checkout cfsm mtemplate
make -C mtemplate
make -C cfsm CPPFLAGS='-D_FORTIFY_SOURCE=0'
mkdir /usr/local/share/cfsm
// Dispatch
//
// Usage:
// Async dispatch to main queue
// -->block
// Async dispatch to queue
// queue --> block
// Sync dispatch to main queue
// -->|block
// Sync dispatch to queue
@staltz
staltz / introrx.md
Last active October 14, 2025 19:39
The introduction to Reactive Programming you've been missing
@suvozy
suvozy / Setup.md
Last active December 28, 2022 07:43
Setup AWS EC2 and RDS (php5.5, apache2.4, mysql5.5, phpmyadmin)
@konklone
konklone / Dockerfile
Created September 22, 2013 18:17
Dockerfile for installing Ruby 2.0 and RVM
FROM ubuntu
MAINTAINER Eric Mill "eric@konklone.com"
# turn on universe packages
RUN echo "deb http://archive.ubuntu.com/ubuntu raring main universe" > /etc/apt/sources.list
RUN apt-get update
# basics
RUN apt-get install -y nginx openssh-server git-core openssh-client curl
RUN apt-get install -y nano