Skip to content

Instantly share code, notes, and snippets.

View rslhdyt's full-sized avatar
🎯
Focusing

Risal Hidayat rslhdyt

🎯
Focusing
View GitHub Profile
@rslhdyt
rslhdyt / LoginProviderController.php
Last active October 2, 2017 02:44
Socialite Callback
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Models\User;
use Auth;
use Illuminate\Http\Request;
use Socialite;
@rslhdyt
rslhdyt / variable.go
Created September 27, 2017 03:25
Golang variables
package main
import "fmt"
var taste bool
func main() {
fruit := "banana"
count := 10
@rslhdyt
rslhdyt / apply-watermark.php
Last active September 22, 2017 13:14
[Intervention Image] Apply multiple watermark to image
<?php
// .....
$img = Image::make('images/picture.jpg');
$watermark = Image::make('images/watermark.png');
$x = 0;
while ($x < $img->width()) {
@rslhdyt
rslhdyt / routes.php
Last active May 12, 2017 15:41
Create table views of all registered routes in Laravel and Lumen
<?php
// FOR LARAVEL
Route::get('route-list', function() {
$routeCollection = Route::getRoutes();
echo "<table style='width:100%'>";
echo "<tr>";
echo "<td width='10%'><h4>HTTP Method</h4></td>";
@rslhdyt
rslhdyt / hello-vue.js
Last active November 30, 2019 06:25
[Hello Vue] Initialize vue js #vuejs
<!DOCTYPE html>
<html>
<head>
<title>Hello Vue</title>
</head>
<body>
<div id="app">
<h1>{{ message }}</h1>
</div>
</body>