This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_startup_errors', 1); | |
ini_set('display_errors', 1); | |
error_reporting(-1); | |
interface Bird{ | |
public function layEgg($egg_name); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Bidding | |
# | |
# Tujuan dari bidding ini adalah untuk mencari harga terendah yang ditawarkan oleh setiap partner sebagai pemenang project. | |
# Terdapat 2 items yang dibuka untuk bidding di bawah ini. | |
# Setiap item mempunyai harga maximum yang boleh diajukan oleh peserta bidding. | |
# Peserta bidding dapat memasukkan harga penawaran selama bidding masih aktif yaitu di antara waktu "start" dan "end". | |
# ##################################################### | |
# Expected result sample: | |
# # item-a - 1000 - 70000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z" | |
ref : https://askubuntu.com/questions/81293/what-is-the-command-to-update-time-and-date-from-internet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MULTIPLE PAIR OF PUBKEY AND PRIVATEKEY FOR MULTIPLE ACCOUNTS | |
STEPS : | |
- generate multiple pair of private and public key | |
ssh-keygen -t rsa -C "[email protected]" | |
ssh-keygen -t rsa -C "[email protected]" | |
=> enter unique name for these prompt "Enter file in which to save the key (/home/user_name/.ssh/id_rsa):" | |
- create config file on ~/.ssh folder containing below configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/questions/33510184/change-mysql-root-password-on-centos7/34207996#34207996 | |
1. Stop mysql: | |
systemctl stop mysqld | |
2. Set the mySQL environment option | |
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables" | |
3. Start mysql usig the options you just set | |
systemctl start mysqld |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REGEX : | |
/(www\.|https?:\/\/)([a-z0-9_\-\.])+([a-z])+\/([a-z0-9_\-\.\/])*([a-z0-9_-])+\.(aif|aiff|bmp|cr2|crdow|db|doc|docx|ds_st|exr|flv|jpeg|jpg|m2ts|m4a|m4v|mkv|mov|mp3|mp4|mpeg|mpg|mxf|pdf|png|psd|rar|rtf|tga|tif|tiff|vid|wav|webm|wma|wmv|xlsx|xml|zip)/gmi | |
LINK : | |
https://regex101.com/r/NjaPbb/1 | |
TEST CASES : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# deployedCommits for https://deployer.org/ | |
# created by marjuqi, nov 2019 | |
# 1. this script is designed to fetch commits in each releases folder. | |
# the final output will be stored in file deployedCommits.log | |
# 2. in the beginning of the setup, just create a dump latestCommitID.log file: | |
# cd /var/www/sites/PROJECT_NAME/ && echo 123456789 > latestCommitID.log | |
# go to the currect version of the codes | |
projectFolder=/var/www/sites/PROJECT_NAME/ | |
cd $projectFolder'current/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### the longest sql queries I've ever made in 2016 | |
### QUERY 3 | |
select nmlokasi, anggaran_pagu, anggaran_realisasi, | |
((anggaran_realisasi/anggaran_pagu)*100) as anggaran_percentage, | |
table_dzohir.dzohir_target, table_dzohir.dzohir_realisasi, table_dzohir.dzohir_percentage | |
from | |
lokasis | |
left join | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### the longest sql queries I've ever made in 2016 | |
### QUERY 2 | |
select table_keuangan.*, dzohir_target,dzohir_realisasi,dzohir_percentage,dzohir_satkeg | |
from | |
( | |
select __is_kegiatan.description as nmitem, table_data.*, | |
((anggaran_realisasi/anggaran_pagu)*100) as anggaran_percentage | |
from __is_kegiatan | |
join ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### the longest sql queries I've ever made in 2016 | |
### QUERY 1 | |
select __is_kegiatan.description as nmitem, table_data.* | |
from __is_kegiatan | |
join | |
( | |
select table_percentage.kdgiat, table_percentage.kdoutput, table_percentage.kdsoutput, | |
((percentage_kdsoutput_by_kdoutput*lembaga_keuangan_jumlah_perkdoutput)/100) as jumlah_pagu, | |
((percentage_kdsoutput_by_kdoutput*lembaga_keuangan_realisasi_perkdoutput)/100) as jumlah_realisasi |