Skip to content

Instantly share code, notes, and snippets.

View diki-haryadi's full-sized avatar
🎯
Focusing

Diki Haryadi diki-haryadi

🎯
Focusing
View GitHub Profile
@diki-haryadi
diki-haryadi / List.md
Created July 19, 2019 08:01 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@diki-haryadi
diki-haryadi / wa_rotator.html
Created July 26, 2019 08:11 — forked from adxio/wa_rotator.html
Simple rotator wa,
<html>
<div id="product_name">Kacamata</div>
<div id="product_group">Fashion</div>
<div id="product_id">10</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script language="JavaScript">
var product_id = $('#product_id').text()
var product_name = $('#product_name').text()
var product_group = $('#product_group').text()
var phone = ['6281312020954','6281312020941','6281312020938']

Initialize Git $ git init $ git add . $ git commit -m "initial commit laravel to heroku"

Membuat Procfile $ echo web: vendor/bin/heroku-php-apache2 public/ > Procfile $ git add . $ git commit -m "procfile for heroku"

+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| STATUS CODE | DESKRIPSI |
+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 200-OK | Request dikatakan berhasil, dan data dari server bisa dilihat di dalam body response dan header nya. |
| 201-Created | Request berhasil terpenuhi, dan hasilnya terbentuk data baru di server |
| 202-Accepted | Request berhasil diterima untuk di proses, teta
+---------+------------------------------------------------------------+
| VERB | DESKRIPSI |
+---------+------------------------------------------------------------+
| GET | Digunakan untuk mengambil data. |
| POST | Digunakan untuk membuat data. |
| PUT | Digunakan untuk mengganti/mengubah data atau collections. |
| DELETE | Digunakan untuk menghapus data. |
+---------+------------------------------------------------------------+
#!/bin/bash
# file: /usr/local/bin/kill_ports
PS3='Please enter your choice: '
options=$(lsof -PiTCP -sTCP:LISTEN | awk '{print $9}' | sed -n '1!p')
RED='\033[0;31m'
NC='\033[0m' # No Color
select port in $options
do
echo "Selected character: $port"
echo "Selected number: $REPLY"
# html
<select id="select">
<option value="1" data-foo="dogs">this</option>
<option value="2" data-foo="cats">that</option>
<option value="3" data-foo="gerbils">other</option>
</select>
# JavaScript using jQuery
$(function(){
$('select').change(function(){
@diki-haryadi
diki-haryadi / CountdownJS.txt
Last active August 30, 2021 04:02
Coundown 1 minutes
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
p {
text-align: center;
font-size: 60px;
margin-top: 0px;
}
@diki-haryadi
diki-haryadi / Install and Config Golang ubuntu.md
Last active September 18, 2021 05:09
Install and Config Golang ubuntu
@diki-haryadi
diki-haryadi / password-change.md
Created September 20, 2021 08:22
Change Password mysql After installation

$ sudo cat /etc/mysql/debian.cnf

# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
password = JRptVM1k9l8SvIau
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost