Skip to content

Instantly share code, notes, and snippets.

View akhwan90's full-sized avatar
🏠
Working from home. Hire me..

Nur Akhwan akhwan90

🏠
Working from home. Hire me..
View GitHub Profile
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
use \Firebase\JWT\JWT;
class AUTHORIZATION {
public static function generateToken($username, $data) {
$ci = get_instance();
$payload = [
sudo chmod 775 -R storage/logs
sudo chown -R USER:www-data storage
php artisan route:cache
php artisan cache:clear
php artisan config:cache
# buat folder /home/bin
# chmod +x script.sh
# export PATH=$PATH:/home/bin
#
#!/bin/bash
USER="root"
PASSWORD=""
OUTPUT="/var/www/html/backupmysql"
// file index.php
// cerita-nya bukan SPA, murni pake Vue buat nggantiin jQuery
<html>
<head>
<script src="<?php echo base_url(); ?>aset/vue.js"></script>
<script src="<?php echo base_url(); ?>aset/axios.min.js"></script>
var app = new Vue({
el: '#app',
data () {
@akhwan90
akhwan90 / index.html
Created November 19, 2018 23:53 — forked from umidjons/index.html
Upload File using jQuery.ajax() with progress support
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Upload File using jQuery.ajax() with progress support</title>
</head>
<body>
<input type="file" name="file" id="sel-file"/>
Hari ini 13:51
dah jangan pada ribut!!
dapat dari temen yg udah duluan..
- yang dimaksud hukum tertulis?
- yang dimaksud hukum tidak tertulis?
- laporan keuangan dipertanggung jawabkan kepada ? menurut UUDS 1950
- Partai pengusung Prabowo pada pilpres?
- Partai pengusung Jokowi pada pilpres?
@akhwan90
akhwan90 / php-pdo-mysql-crud.md
Created August 16, 2018 04:33 — forked from odan/php-pdo-mysql-crud.md
Basic CRUD operations with PDO and MySQL

Basic CRUD operations with PDO

CRUD = Create, Read, Update, Delete

Open a database connection

$host = '127.0.0.1';
$dbname = 'test';
$username = 'root';
// BUAT RESOURCE
Method :
POST
Header :
Authorization : API_KEY
Content-Type : application/x-www-form-urlencoded
URL :
http://satudata.kulonprogokab.go.id/api/3/action/resource_create
Data :
{"package_id": "DATASET__ID", "name": "Nama_Resource", "format": "csv|xls|xlsx|json"}
CentOS
- https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-centos-7
- buka file /etc/httpd/conf.d/ssl.conf, pastekan di bawah ini
SSLCertificateFile /etc/letsencrypt/live/{{nama_domain}}/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/{{nama_domain}}/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/{{nama_domain}}/chain.pem
Ubuntu

Langkah-langkah menyiapkan server web LINUX

spesifikasi

  • php 7.0 (rewrite_module enabled)
  • mysql 5.5
  • phpmyadmin (untuk database manager)
  • vsftpd (untuk akses ftp)
  • ioncube (jika ada skrip yg dienkripsi)

install linux