Skip to content

Instantly share code, notes, and snippets.

View henrytran9x's full-sized avatar

Andy Tran henrytran9x

  • Mercury
  • Vietnam
View GitHub Profile
#Steps taken to install Big Blue Button in CentOS 6
# we'll work mostly from the /tmp/ directory:
cd /tmp
# install MySQL server
yum install -y mysql-server
service mysqld start
chkconfig mysqld on
@henrytran9x
henrytran9x / query.sql
Created June 30, 2017 08:24
Change type column nam set utf8
/** This fix error limit import question in moodle **/
ALTER TABLE `mdl_question` CHANGE `name` `name` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '';
@henrytran9x
henrytran9x / gist:fbb3111accfc0082df7d58fb1b92e8ba
Created June 24, 2017 08:04
ssh_exchange_identification: read: Connection reset by peer for Centos 7
service sshd stop
sudo vi /etc/hosts.allow
#add text in file
sshd: ALL
#your need remove directory empty
rm -rf /var/empty
# so create directory empty again and create directory sshd into dir empty
mkdir /var/empty/sshd
# start again sshd
service sshd start
@henrytran9x
henrytran9x / demo-pikaday.html
Last active June 20, 2017 08:14
This demo pikaday
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<title>Pikaday - weeknumbers example</title>
<meta name="author" content="Maxime Thirouin">
<link rel="stylesheet" href="../css/pikaday.css">
<link rel="stylesheet" href="../css/site.css">
</head>
@henrytran9x
henrytran9x / gist:2985be016a8705dcaf80813e0188992f
Created June 19, 2017 03:53
Git Bash mysql blank in Window
winpty mysql -h localhost -u root -p
<?php
// ...
use Symfony\Component\HttpFoundation\Response;
// Then later on (inside your controller's class), you have a function used
// for the route_name (on a hook_menu() item in your .module file), this
// function can return a JSON response...
@henrytran9x
henrytran9x / function.php
Created May 24, 2017 15:38
Function Time Ago
<?php
function timeAgo($time_ago) {
$time_ago = strtotime($time_ago) ? strtotime($time_ago) : $time_ago;
$time = time() - $time_ago;
switch($time):
// seconds
case $time <= 60;
return 'lessthan a minute ago';
// minutes
@henrytran9x
henrytran9x / gist:b8f386adadda03d9f00ec72d920434b8
Created March 26, 2017 08:30
How to root Android for window !
1. Down Driver ADB https://developer.android.com/studio/releases/platform-tools.html
2. Configurate environment variables in windows http://lifehacker.com/the-easiest-way-to-install-androids-adb-and-fastboot-to-1586992378
3.
@henrytran9x
henrytran9x / index.html
Last active January 11, 2017 02:11
Sample Landing Page Location
<!-- Module Slider -->
<div class="section section-slider no-padding">{module Alexandra }
<div class="ob_overlay">
<div class="overlay over_1">{module Hodiday Hours}</div>
<div class="overlay over_2"><span class="phone_txt">VetEnt Otorohanga<br />Ph +64 7 873 8275</span><br /> Opening Hours<br /> Mon&shy;Fri: 8.00am &shy; 5.00pm<br /> Sat: 10.00am &shy; 12.00pm<br /> Sun: Closed<br /> <strong>24&shy;hour emergency service</strong></div>
</div>
</div>
<!-- End Module Slider -->
<!-- Content Location -->
<!--