Skip to content

Instantly share code, notes, and snippets.

View zarulizham's full-sized avatar
🏠
Working from home

Zarul Izham Zubir zarulizham

🏠
Working from home
  • Pro Office Solutions
  • Selangor, Malaysia
  • 17:20 (UTC +08:00)
View GitHub Profile
@zarulizham
zarulizham / cpdf-merge.md
Created April 24, 2024 14:32
cpdf merge pdf files

BACKUP

mysqldump -hHOST -uUSER -p DATABASE_NAME > backup.sql

Remove definer

sed -i 's/\sDEFINER=`[^`]*`@`[^`]*`//' backup.sql
@zarulizham
zarulizham / dropdown-menu-fixes.js
Created March 22, 2024 01:12
Fix dropdown-menu under table-responsive class
$('.table-responsive').on('show.bs.dropdown', function () {
$('.table-responsive').css( "overflow", "inherit" );
});
$('.table-responsive').on('hide.bs.dropdown', function () {
$('.table-responsive').css( "overflow", "auto" );
})
@zarulizham
zarulizham / Payload.xml
Created June 22, 2020 01:27
WSO2 Multipart Payload
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<mediate>
<attachment filename="zip_10MB.zip">attachment_base64_values_here</attachment>
<full_name>Muhamad Zarul</full_name>
</mediate>
</soapenv:Body>
</soapenv:Envelope>
@zarulizham
zarulizham / MultipartAPI.xml
Last active June 22, 2020 01:32
WSO2 API Multipart Content Type. Attach String or attachments and store to the WSO2 filesystem.
<?xml version="1.0" encoding="UTF-8"?>
<api context="/multi" name="MultipartAPI" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST">
<inSequence>
<property name="messageType" scope="axis2" type="STRING" value="multipart/form-data" />
<property name="attachment_base64" expression="//mediate/attachment"></property>
<property name="attachment_filename" expression="//mediate/attachment/@filename"></property>
<log level="custom">
<property name="full_name" expression="//mediate/full_name/text()"></property>
<property name="attachment_filename" expression="//mediate/attachment/@filename"></property>
#!/bin/bash
# /root/new-domain-ssl.sh example.com /var/www/html [on/off] [/etc/ssl/...] [/etc/ssl/...]
clear
if [ -z "$1" ]
then
echo -e $" - Please specify a name for first parameter. \n For info: --info"
exit 0
@zarulizham
zarulizham / add-user.sh
Last active July 4, 2018 03:01 — forked from askz/add-user.sh
Chroot Jail for SSH/SFTP Access toolkit
#!/bin/bash
# add "prisoner" in the jail you created before !!
# USAGE : ./add-user.sh <username> <password> <type>
# Type 1 : sftp jailed user ; Type 2 ssh jailed user
# A password will be auto-generated with pwgen (sudo apt install pwgen)
# Set your jail path wherever you want.
JAIL_PATH=/home/www/
- Do a `git clone https://github.com/dashevo/bitcore-node-dash -b impr/getVersion`
- cd bitcore-node-dash
- npm install
- npm install insight-api-dash --S
- npm install insight-ui-dash --S
- cd $HOME/.bitcore/
- vim or nano bitcore-node-dash.json
- paste [REF2]