Skip to content

Instantly share code, notes, and snippets.

View charles85's full-sized avatar

Charles charles85

View GitHub Profile
// Single-line comments start with //
/*
Multi-line comments look like this.
*/
// Import ArrayList class inside of the java.util package
import java.util.ArrayList;
// Import all classes inside of java.lang package
import java.security.*;
@charles85
charles85 / mms-mm7
Last active March 15, 2023 01:20
How to Send multipart related MMS via MM7 Standard in PHP using CURL
<?php
$auth_basic = base64_encode(username:password);
$url = 'http://xxxx.xxx.xxx:xxxxx/mm7/xxxx.xxx';
$boundary = uniqid(); // generate uniqe boundary
##Load animated graphics
$im = file_get_contents($image_path);
$img_data = base64_encode($im);
$mms_text_header = 'This is a MMS TEXT';
[root@ns0 ~]# cd /mnt
[root@ns0 mnt]# ls
[root@ns0 mnt]# mkdir xs-tools
[root@ns0 mnt]# mount /dev/xvdd /mnt/xs-tools/
mount: block device /dev/xvdd is write-protected, mounting read-only
[root@ns0 mnt]# cd /mnt/xs-tools/Linux/
[root@ns0 Linux]# bash install.sh
Detected `CentOS release 5.2 (Final)' (centos version 5).
The following changes will be made to this Virtual Machine:
@charles85
charles85 / Centos Linux IP
Last active December 19, 2015 05:39
Centos Linux IP setting
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static