Skip to content

Instantly share code, notes, and snippets.

View fajars87's full-sized avatar
🌴
On vacation

Fajar Suryanto fajars87

🌴
On vacation
View GitHub Profile
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@fajars87
fajars87 / countdown-redirect.html
Created November 1, 2018 01:41 — forked from Joel-James/countdown-redirect.html
Count Down Redirect Uisng JavaScript
<!-- Modify this according to your requirement -->
<h3>
Redirecting to duckdev.com after <span id="countdown">10</span> seconds
</h3>
<!-- JavaScript part -->
<script type="text/javascript">
// Total seconds to wait
var seconds = 10;
@fajars87
fajars87 / deploy.php
Created October 26, 2018 09:27 — forked from oxguy3/deploy.php
Script used to automatically deploy from GitHub to a cPanel shared hosting server
<?php
/**
* deploy.php by Hayden Schiff (oxguy3)
* Available at https://gist.github.com/oxguy3/70ea582d951d4b0f78edec282a2bebf9
*
* No rights reserved. Dedicated to public domain via CC0 1.0 Universal.
* See https://creativecommons.org/publicdomain/zero/1.0/ for terms.
*/
// random string of characters; must match the "Secret" defined in your GitHub webhook
@fajars87
fajars87 / LoginController.php
Created April 2, 2018 16:11 — forked from SaeedPrez/LoginController.php
Laravel 5.4 Additional Login Conditions - Add custom error message.
<?php
// This is code to return custom error message
// for Youtube tutorial: Laravel 5.4 Additional Login Conditions
// https://www.youtube.com/watch?v=Z8s6uhhD1Pk
namespace App\Http\Controllers\Auth;
@fajars87
fajars87 / laravel-[.htaccess]
Created January 31, 2018 09:26 — forked from iwebroot/laravel-[.htaccess]
[Fix error : 500] : Multiple laravel projects in shared hosting
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
### Add two lines for fix error 500 ###
Options -Indexes
php_flag xcache.cacher 0
@fajars87
fajars87 / Base64Encode-Decode.php
Created December 13, 2017 03:06 — forked from nirendra/Base64Encode-Decode.php
Base64 Encode and Decode String in PHP
function base64url_encode($plainText) {
$base64 = base64_encode($plainText);
$base64url = strtr($base64, '+/=', '-_,');
return $base64url;
}
function base64url_decode($plainText) {
$base64url = strtr($plainText, '-_,', '+/=');
$base64 = base64_decode($base64url);
return $base64;

Deploying to a Device Improve this doc

Testing your app in the browser with ionic serve or with an emulator is fast, easy and convenient when your app is in development, but eventually you’re going to have to test on a device. Not only is it the only way to accurately test how your app will behave and perform, many Ionic Native plugins will only work when they are run on actual hardware.

Android Devices

Deploying to an Android device is a fairly straightforward process. If you have a working Android development environment, you’re ready to go.

Requirements

@fajars87
fajars87 / ionic-action-sheet-android.css
Created November 10, 2017 06:29 — forked from chonz0/ionic-action-sheet-android.css
Ionic: nicer styles for action sheet in Android
/*
* Credits to https://forum.ionicframework.com/t/actionsheets-android-ugly-styling-need-help/18462/12
*/
.platform-android .action-sheet-backdrop.active {
background-color: rgba(0, 0, 0, 0.1);
}
.platform-android .action-sheet {
align-content: center;
margin: auto;
max-width: 96vw;
@fajars87
fajars87 / kode_pos.php
Created November 6, 2017 10:02 — forked from bachors/kode_pos.php
Membuat API kode POS Indonesia
<?php
/* Just 4 Fun
API kode POS Indonesia
by iBacor.com */
function kode_pos($q){
// array untuk output
$result = array();
var token = 'token anda',
num_photos = 16;
$.ajax({
url: 'https://api.instagram.com/v1/users/self/media/recent',
dataType: 'jsonp',
type: 'GET',
data: {access_token: token, count: num_photos},
success: function(data){
console.log(data);