Skip to content

Instantly share code, notes, and snippets.

View kriskornel's full-sized avatar
👋

Kornelius Tjokorda Bagus kriskornel

👋
View GitHub Profile
@kriskornel
kriskornel / countdown.js
Created January 29, 2018 01:31 — forked from adhithyan15/countdown.js
A simple countdown timer in Javascript
/********************************************************************************************************************
Countdown.js is a simple script to add a countdown timer
for your website. Currently it can only do full minutes
and partial minutes aren't supported. This script is a fork of http://jsfiddle.net/HRrYG/ with some
added extensions. Since the original code that I forked was released under Creative Commons by SA license,
I have to release this code under the same license. You can view a live demo of this code at http://jsfiddle.net/JmrQE/2/.
********************************************************************************************************************/
function countdown(minutes) {
var seconds = 60;
var mins = minutes
@kriskornel
kriskornel / Classr Production Deployment
Last active January 21, 2018 06:58
Command For Deployment in Server
# Langkah-langkah untuk Merge Ke Production:
--
## Contents:
--
1. Bitbucket
- Merge dari branch dev ke master (lakukan melalui bitbucket)
- Masuk ke Server lakukan pull request untuk coding terbaru:
```git pull origin master```
@kriskornel
kriskornel / schedule-logic.js
Created November 27, 2017 09:58
SCHEDULE LOGIC USING VUE.JS
window.App = new Vue({
el: '#app',
data: {
low: 0,
median: 0,
high: 0,
duration: 0,
lecture_duration: [],
weekdays: {
mon: [],
@kriskornel
kriskornel / schedule-logic.js
Created November 27, 2017 09:58
SCHEDULE LOGIC USING VUE.JS
window.App = new Vue({
el: '#app',
data: {
low: 0,
median: 0,
high: 0,
duration: 0,
lecture_duration: [],
weekdays: {
mon: [],
@kriskornel
kriskornel / schedule-logic.js
Created November 27, 2017 09:58
SCHEDULE LOGIC USING VUE.JS
window.App = new Vue({
el: '#app',
data: {
low: 0,
median: 0,
high: 0,
duration: 0,
lecture_duration: [],
weekdays: {
mon: [],
@kriskornel
kriskornel / schedule-logic.js
Created November 27, 2017 09:57
SCHEDULE LOGIC USING VUE.JS
window.App = new Vue({
el: '#app',
data: {
low: 0,
median: 0,
high: 0,
duration: 0,
lecture_duration: [],
weekdays: {
mon: [],
@kriskornel
kriskornel / Ubuntu Command Empty Log.md
Last active October 23, 2017 19:14
Command for emptying the content of Nginx Log Files in Ubuntu
root@deikxyz:~# cat /dev/null >  cat /dev/null > /var/log/nginx/access.log
(hit enter)
root@deikxyz:~# cat /dev/null >  cat /dev/null > /var/log/nginx/error.log
(hit enter)
@kriskornel
kriskornel / Caddyfile
Created October 23, 2017 11:06 — forked from lopezjurip/Caddyfile
Fix Too Many Redirect error using Caddy + Cloudflare
www.mysite.com, mysite.com {
proxy / webapp:3000 {
proxy_header Host {host}
proxy_header X-Real-IP {remote}
proxy_header X-Forwarded-Proto {scheme}
}
gzip
tls your@email.com
}
@kriskornel
kriskornel / benchmark+go+nginx.md
Created October 22, 2017 04:53 — forked from hgfischer/benchmark+go+nginx.md
Benchmarking Nginx with Go

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI
@kriskornel
kriskornel / http-benchmark.md
Created September 5, 2017 23:22 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)