Skip to content

Instantly share code, notes, and snippets.

View ypwu1's full-sized avatar
Powered by ⚰️

Oscar ypwu1

Powered by ⚰️
  • Melbourne
View GitHub Profile
@ypwu1
ypwu1 / .gitconfig
Last active August 29, 2015 14:06 — forked from pksunkara/config
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@ypwu1
ypwu1 / git-aliases.md
Last active November 17, 2016 20:25 — forked from mwhite/git-aliases.md

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@ypwu1
ypwu1 / introrx.md
Created February 2, 2016 11:25 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@ypwu1
ypwu1 / angularjs_directive_attribute_explanation.md
Created May 3, 2016 02:00 — forked from CMCDragonkai/angularjs_directive_attribute_explanation.md
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@ypwu1
ypwu1 / BrewBindInstallAndSetupMacOSX10_10.sh
Created July 5, 2016 13:17 — forked from mpaskalev/BrewBindInstallAndSetupMacOSX10_10.sh
Install and setup bind (named) on Mac OS X 10.10.1 with brew 0.9.5
#!/bin/bash
# Run as root or sudo the commands that need it as you go.
# brew version 0.9.5
# Mac OS X 10.10.1
# A little bit changed version of this:
# http://stackoverflow.com/questions/19538118/osx-mavericks-bind-no-longer-installed-how-to-get-local-dns-server-working
@ypwu1
ypwu1 / jenkins_haproxy_config.cfg
Created July 6, 2016 10:02 — forked from xelwarto/jenkins_haproxy_config.cfg
Jenkins CI haproxy configuration example
global
chroot /var/lib/haproxy
crt-base /etc/pki/tls/certs
daemon
group haproxy
log 127.0.0.1 local0
maxconn 2000
pidfile /var/run/haproxy.pid
stats socket /var/lib/haproxy/stats
tune.ssl.default-dh-param 2048
@ypwu1
ypwu1 / docker_command
Created May 11, 2017 20:40 — forked from likwid/docker_command
Postgres with ssl in docker
#This isn't very secure, but its for demo purposes
docker run --name postgres -e POSTGRES_PASSWORD=password -d -p 54320:5432 \
-v $(pwd)/postgresql.conf:/srv/postgresql.conf \
-v $(pwd)/server.crt:/srv/server.crt \
-v $(pwd)/server.key:/srv/server.key \
-v $(pwd)/reconfigure_postgres.sh:/docker-entrypoint-initdb.d/reconfigure_postgres.sh \
postgres:9.5
@ypwu1
ypwu1 / README.txt
Created September 19, 2019 06:12 — forked from ncw/README.txt
Client side certificates with go
This demonstrates how to make client side certificates with go
First generate the certificates with
./makecert.sh test@test.com
Run the server in one terminal
go run server.go
@ypwu1
ypwu1 / main.go
Created February 28, 2020 21:05 — forked from vdparikh/main.go
GoLang Verify/Generate JWT Token
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"strings"
"time"
@ypwu1
ypwu1 / README.md
Created July 7, 2020 22:49 — forked from crypticmind/README.md
Setup lambda + API Gateway using localstack