Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
read -p 'full domain name: ' domain
openssl genrsa -des3 -out $domain.key 2048
openssl req -new -key $domain.key -out $domain.csr
#openssl x509 -req -days 365 -in $domain.csr -signkey $domain.key -out $domain.crt
openssl req -nodes -new -x509 -keyout $domain.nopassphrase.key -out $domain.nopassphrase.crt
#!/bin/bash
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
# PLEASE UPDATE CONFIG BELOW #
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
# local file backup directory
path='/home/hary/backup/app'
# ftp/sftp config
ftptype="sftp" #ftp
#!/bin/bash
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
# PLEASE UPDATE CONFIG BELOW #
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
# local file backup directory
path='/home/hary/backup/db'
# mysql config
dbuser="root"
@haryx8
haryx8 / cleansing_db.sh
Created February 1, 2016 06:28
copy selected database to another database and run cleansing procedure
#!/bin/bash
ndate=$(date +"%m_%d_%Y_%H_%M")
clear
read -p 'IP DB Server ('$1'): ' ipdbs
read -p 'DB Source name ('$1'): ' sorsdb
read -p 'Email to: ' msmto
read -p 'Email from: ' mfrom
read -sp 'Email from password: ' msmps
echo -e ""
<?php
zend_loader_install_license("/license_file.zl", true);
?>
@haryx8
haryx8 / php.ini
Last active February 9, 2016 20:47
zend_optimizer.licence_path = "/license_file.zl"
zend_loader.license_path = "/license_file.zl"
php_value zend_optimizer.licence_path "/license_file.zl"
php_value zend_loader.license_path "/license_file.zl"
#!/bin/bash
# param1 sshport
# param2 suffix zend gui password
# example execute: ./thisfile.sh 22 localhost
echo "Please wait..."
sshport=$1
zendgui="590@pp$2"
appportsbo="801 802 803 804 805 806 807 808 809 810"
# mkisofs on linux:
mkisofs -T -r -o filename.iso pathname/
# mkisofs on windows:
mkisofs -v -dvd-video -V "VOLUME_NAME" -o "c:\my movies\iso\movie.iso" "c:\my movies\dvd"
mkisofs -r -R -J -l -L -o image-file.iso c:\project\install
package main
import (
"encoding/json"
"fmt"
"log"
)
type Envelope struct {
Type string