Skip to content

Instantly share code, notes, and snippets.

View vihoangson's full-sized avatar

Vi Hoàng Sơn vihoangson

View GitHub Profile
@vihoangson
vihoangson / esms.vn send sms tự động .php
Last active February 2, 2016 10:08
esms.vn send sms tự động .php
<?php
$APIKey = "APIKey";
$SecretKey = "SecretKey";
$YourPhone = "Your phone number";
$Content = "Your content";
// do function
send_sms($APIKey,$SecretKey,$YourPhone,$Content);
function send_sms($APIKey,$SecretKey,$YourPhone,$Content){
@vihoangson
vihoangson / Button_shortcode_function.php
Last active October 25, 2018 14:03
Make button shortcode for wordpress
<?php
// init process for registering our button
add_action('init', 'wpse72394_shortcode_button_init');
function wpse72394_shortcode_button_init() {
//Abort early if the user will never see TinyMCE
if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') && get_user_option('rich_editing') == 'true')
return;
<script language="Javascript">
jQuery.fn.extend({
insertAtCaret: function(myValue) {
return this.each(function(i) {
if (document.selection) {
//For browsers like Internet Explorer
this.focus();
sel = document.selection.createRange();
sel.text = myValue;
<?php
/**
* PHPExcel
*
* Copyright (C) 2006 - 2013 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.