Skip to content

Instantly share code, notes, and snippets.

View AgungPambudi's full-sized avatar
😃
Learning by doing

Agung Pambudi AgungPambudi

😃
Learning by doing
View GitHub Profile
@AgungPambudi
AgungPambudi / cron_backup.sh
Created December 4, 2019 04:43
bash script to backup list cronjob (Linux)
#!/bin/bash
#title : cron_backup.sh
#description : bash script to backup list cronjob (Linux).
#author : Agung Pambudi
#website : http://agungpambudi.com
#email : mail@agungpambudi.com
#version : 0.1
#==============================================================================
#
# _ _ _
@AgungPambudi
AgungPambudi / autoremove_ftp_file.sh
Created December 4, 2019 04:46
bash script to remove file from FTP
#!/bin/bash
#title : autoremove_ftp_file.sh
#description : bash script to remove file from FTP.
#author : Agung Pambudi
#website : http://agungpambudi.com
#email : mail@agungpambudi.com
#version : 0.1
#requirement : apt-get install ncftp
#==============================================================================
#
@AgungPambudi
AgungPambudi / mysql_kill_process_based_on_ips.sh
Created December 4, 2019 04:50
bash script to kill process "SELECT & Sleep" at processlist in MySQL.
#!/bin/bash
#title : mysql_kill_process_based_on_ips.sh
#description : bash script to kill process "SELECT & Sleep" at processlist in MySQL.
#author : Agung Pambudi
#website : http://agungpambudi.com
#email : mail@agungpambudi.com
#version : 0.2
#==============================================================================
#
# _ _ _
@AgungPambudi
AgungPambudi / upload_files_filtering_to_ftp.php
Last active December 5, 2019 07:59
php script to upload files from local to ftp server
<?php
/*
| title : upload_files_filtering_to_ftp.php
| description : php script to upload files from local to ftp.
| author : Agung Pambudi
| website : http://agungpambudi.com
| email : mail@agungpambudi.com
| format args : "17-12-23"
| _ _ _
| ___ ___ _ _ ___ ___ ___ ___ _____| |_ _ _ _| |_| ___ ___ _____
@AgungPambudi
AgungPambudi / mysql-charset-2-latin1.bat
Last active December 5, 2019 08:03
batch file to convert character set to latin1 in MySQL (All Tables)
REM by Agung Pambudi
REM mail@agungpambudi.com
REM http://agungpambudi.com
REM _ _ _
REM ___ ___ _ _ ___ ___ ___ ___ _____l l_ _ _ _l l_l ___ ___ _____
REM l .'l . l l l l . l . l .'l l . l l l . l l_l _l . l l
REM l__,l_ l___l_l_l_ l _l__,l_l_l_l___l___l___l_l_l___l___l_l_l_l
REM l___l l___l_l
REM
REM Batch file to convert character set to latin1 in MySQL Table
@AgungPambudi
AgungPambudi / backup_restore_ms_sql.bat
Created December 6, 2019 02:28
batch file to backup and restore microsoft sql server.
@echo off
REM title : backup_restore_ms_sql.bat
REM description : batch file to backup and restore microsoft sql server.
REM author : Agung Pambudi
REM website : http://agungpambudi.com
REM email : mail@agungpambudi.com
REM requirement : MS SQL 2005
REM _ _ _
REM ___ ___ _ _ ___ ___ ___ ___ _____I I_ _ _ _I I_I ___ ___ _____
REM I .'I . I I I I . I . I .'I I . I I I . I I_I _I . I I
@AgungPambudi
AgungPambudi / mysql_select_query_to_view_certain_condition_using_sum_if_distinct_concat.sql
Created December 6, 2019 03:58
MySQL SELECT query to view certain condition using SUM IF DISTINCT CONCAT
# title : mysql_select_query_to_view_certain_condition_using_sum_if_distinct_concat.sql
# description : select query to view certain condition
# author : Agung Pambudi
# website : http://agungpambudi.com
# email : mail@agungpambudi.com
# requirement : MySQL / Maria DB
# _ _ _
# ___ ___ _ _ ___ ___ ___ ___ _____| |_ _ _ _| |_| ___ ___ _____
# | .'| . | | | | . | . | .'| | . | | | . | |_| _| . | |
# |__,|_ |___|_|_|_ | _|__,|_|_|_|___|___|___|_|_|___|___|_|_|_|
@AgungPambudi
AgungPambudi / for_logic_to_looping_table_name_and_strore_in_array.php
Created December 7, 2019 09:32
php script 'FOR logic' to looping table names and store in array
<?php
/*
| title : for_logic_to_looping_table_name_and_strore_in_array.php
| description : php script for logic to looping tablenames and store in array.
| author : Agung Pambudi
| website : http://agungpambudi.com
| email : mail@agungpambudi.com
| _ _ _
| ___ ___ _ _ ___ ___ ___ ___ _____| |_ _ _ _| |_| ___ ___ _____
| | .'| . | | | | . | . | .'| | . | | | . | |_| _| . | |
@AgungPambudi
AgungPambudi / mysqldump_list_using_array.php
Created December 9, 2019 02:07
php script to get the lists of mysqldump on windows or mac/linux.
<?php
/*
| title : mysqldump_list_using_array.php
| description : php script to get the lists of mysqldump on windows or mac/linux.
| author : Agung Pambudi
| website : http://agungpambudi.com
| email : mail@agungpambudi.com
| source : https://www.php.net/manual/en/index.php, https://www.php.net/manual/en/function.array-merge.php
| _ _ _
| ___ ___ _ _ ___ ___ ___ ___ _____| |_ _ _ _| |_| ___ ___ _____
@AgungPambudi
AgungPambudi / mysql_batch_insert.sql
Last active December 9, 2019 02:42
INSERT SELECT query with DUPLICATE KEY UPDATE
# title : mysql_batch_insert.sql
# description : INSERT SELECT query with DUPLICATE KEY UPDATE
# author : Agung Pambudi
# website : http://agungpambudi.com
# email : mail@agungpambudi.com
# requirement : MySQL / Maria DB
# alternative : REPLACE query in MySQL
# _ _ _
# ___ ___ _ _ ___ ___ ___ ___ _____| |_ _ _ _| |_| ___ ___ _____
# | .'| . | | | | . | . | .'| | . | | | . | |_| _| . | |