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 / composer.json
Created September 16, 2017 04:33
Contoh load baligram package
{
"name": "jimboy/testbaligram",
"authors": [
{
"name": "Wayan Jimmy",
"email": "[email protected]"
}
],
"repositories": [
{
@wayanjimmy
wayanjimmy / gallery.js
Created June 24, 2017 10:52
Ionic file upload gallery
@wayanjimmy
wayanjimmy / install_php71.sh
Last active October 2, 2019 14:28
Install php7.1 ubuntu 16.04 EC2
sudo apt-get update -y
sudo apt-get install -y nginx
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update -y
sudo apt-get install -y php7.1 php7.1-fpm php7.1-cli php7.1-common php7.1-mbstring php7.1-gd php7.1-intl php7.1-xml php7.1-mysql php7.1-mcrypt php7.1-zip
sudo apt-get install php-curl
@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