Skip to content

Instantly share code, notes, and snippets.

View sakukode's full-sized avatar

Rizqi Maulana sakukode

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Menampilkan pesan notifikasi dengan Toastr JS</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css">
<style type="text/css">
body {
margin-top: 50px;
@sakukode
sakukode / GoogleDriveServiceProvider.php
Last active October 18, 2017 12:33 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
@sakukode
sakukode / tmux-cheatsheet.markdown
Created September 22, 2017 00:23 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@sakukode
sakukode / nginxproxy.md
Created August 6, 2017 11:35 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@sakukode
sakukode / default
Created August 3, 2017 04:21 — forked from mrofi/default
Set up Automatic Virtual Hosts with Nginx
#/etc/nginx/sites-available/default
server {
listen 80;
server_name ~^(www\.)?(?<sname>.+?).dev$;
root /home/mokhamad/html/suit/$sname/public;
location ~ /.well-known {
@sakukode
sakukode / default.conf
Created August 3, 2017 04:21 — forked from mrofi/default.conf
NGINX Server Block
#BLOCKNAME
server {
listen 80;
server_name servername.com;
return 302 https://$server_name$request_uri;
}
server {
@sakukode
sakukode / ubuntu_agnoster_install.md
Created August 2, 2017 13:37 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 14.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@sakukode
sakukode / RestControllerTrait.php
Created July 21, 2017 08:38 — forked from beanmoss/RestControllerTrait.php
Playing with Laravel Lumen: simple RESTful trait.
<?php namespace App\Http\Controllers;
use Illuminate\Http\Request;
trait RestControllerTrait
{
public function index()
{
$m = self::MODEL;
return $this->listResponse($m::all());

Files

Route

./routes/Resource.php # get model resource
./routes/web.php # include and define resource

Controller

./app/Http/Controllers/RestfulControllerTrait.php # restful trait
./app/Http/Controllers/Controller.php # use restful trait
@sakukode
sakukode / cloudSettings
Created June 4, 2017 04:11 — forked from spencercarli/bd3d4befe38185704bf0fc875e9deed6|configuration.json
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-06-01T00:35:28.233Z","extensionVersion":"v2.8.1"}