Skip to content

Instantly share code, notes, and snippets.

View wayanjimmy's full-sized avatar
🏠
Working from home

Wayan jimmy wayanjimmy

🏠
Working from home
View GitHub Profile
@wayanjimmy
wayanjimmy / .htaccess
Created June 15, 2017 03:32
Laravel .htaccess for Shared hosting (idhostinger)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
@wayanjimmy
wayanjimmy / tasks.json
Created June 14, 2017 07:53
VsCode tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "php-cs-fixer",
"isShellCommand": true,
"args": ["fix", "${file}", "--config", "${workspaceRoot}/.php-cs"],
"showOutput": "never"
}
@wayanjimmy
wayanjimmy / base64.java
Created November 13, 2016 14:58
Base 64 Encoder
public class Base64Encoder {
/**
* Encode some data and return a String.
*/
public final static String encode(byte[] d) {
if (d == null) return null;
byte data[] = new byte[d.length + 2];
System.arraycopy(d, 0, data, 0, d.length);
byte dest[] = new byte[(data.length / 3) * 4];
@wayanjimmy
wayanjimmy / disable_git_filemode.sh
Created October 20, 2016 01:35
Disable git detecting file mode changes
git config core.filemode false
@wayanjimmy
wayanjimmy / phpspec.yml
Created September 24, 2016 15:43
Php spec sample config for laravel
suites:
my_suite:
namespace: App
psr4_prefix: App
src_path: app
spec_prefix: spec
@wayanjimmy
wayanjimmy / AuthServiceProvider.php
Last active January 4, 2024 09:32
Extend Laravel SessionGuard
<?php
namespace App\Providers;
use App\Extensions\SessionAnonymousGuard;
use Illuminate\Auth\SessionGuard;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
@wayanjimmy
wayanjimmy / gitflow-breakdown.md
Created July 5, 2016 13:33 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

@wayanjimmy
wayanjimmy / disable_xdebug.sh
Created June 12, 2016 15:59
Disable xdebug
sudo php5dismod -s cli xdebug
@wayanjimmy
wayanjimmy / BackendRouteListCommand.php
Last active June 7, 2016 12:39
Override RouteListCommand
<?php
namespace App\Console\Commands\Route;
use Illuminate\Console\Command;
use Illuminate\Foundation\Console\RouteListCommand;
use Illuminate\Routing\Router;
class BackendRouteListCommand extends RouteListCommand
{
@wayanjimmy
wayanjimmy / masuk-1-keluar2.txt
Last active June 16, 2016 16:48
Hasil Olah Data
+------------+-------------+--------------+
| Number | Interval In | Interval Out |
+------------+-------------+--------------+
| 1145 KH | 27 | 24,39 |
| 1507 AC | 30 | 21,38 |
| 875 KU | 31 | 22,37 |
| 1387 AK | 33 | 34,57 |
| 1118 OB | 26 | 18,49 |
| 729 BD | 26 | 7,26 |
| 1663 IU | 21 | 7,24 |