Skip to content

Instantly share code, notes, and snippets.

View mrtonyhuynh's full-sized avatar
😇
Nice & Professional

Tony Huỳnh mrtonyhuynh

😇
Nice & Professional
View GitHub Profile
@mrtonyhuynh
mrtonyhuynh / database.md
Last active August 29, 2015 14:02
Linux Server

Login MySQL

mysql -u root -p

Create User

CREATE USER 'username'@'%' IDENTIFIED BY 'password'
1. Quản lý, xử lý và chia sẻ hình ảnh: 10 người
2. Streaming server (Video, Live streamming, music, ... ): 10 người
3. Website mạng xã hội: 10 người
4. Chat & Notification server: 10 người
5. Quản lý và xử lý dữ liệu đồ thị (graph database): 10 người
MÔ TẢ CÔNG VIỆC:
Với mỗi dự án đều cần PM, Tech lead, Team lead, Senior và Junior developer để xử lý các công việc sau:
- Xử lý database

CREATE RANDOM HASH

openssl rand -base64 32
date | md5sum

DOWNLOAD FILE

Khởi tạo

Historical Branches

Tạo branch develop cho dự án

git branch develop
git push -u origin develop
Hello!
Basic installed stuff:
- PHP (5.5.12) (see http://localhost/info.php)
- Node (0.12.2)
- MySql (5.5.41)
- Phalcon (2.0.0)
- PostgreSQL
- Mongo
- Android development environment (note that you cannot actually run android vm inside this vm, darn... I'll try to figure out this though)
@mrtonyhuynh
mrtonyhuynh / API
Last active February 27, 2016 03:30 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs
1. Count social sharing from API
@mrtonyhuynh
mrtonyhuynh / gist:35681731db3abda06e8c
Created March 28, 2016 03:13 — forked from nathanjohnson320/gist:7283784
Use the Google Places API with node.js
exports.randeats = function(req, res){
var key = req.query.key;
var location = encodeURIComponent(req.query.location);
var radius = 16000;
var sensor = false;
var types = "restaurant";
var keyword = "fast";
var https = require('https');
var url = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?" + "key=" + key + "&location=" + location + "&radius=" + radius + "&sensor=" + sensor + "&types=" + types + "&keyword=" + keyword;
@mrtonyhuynh
mrtonyhuynh / viewport.js
Created May 27, 2016 02:27 — forked from bohman/viewport.js
jQuery get viewport size
// -----------
// Debugger that shows view port size. Helps when making responsive designs.
// -----------
function showViewPortSize(display) {
if(display) {
var height = jQuery(window).height();
var width = jQuery(window).width();
jQuery('body').prepend('<div id="viewportsize" style="z-index:9999;position:fixed;top:40px;left:5px;color:#fff;background:#000;padding:10px">Height: '+height+'<br>Width: '+width+'</div>');
jQuery(window).resize(function() {
@mrtonyhuynh
mrtonyhuynh / custom-social-share.html
Created December 16, 2016 03:31
Custom Social Share Button with Callback
<html>
<head>
<title>Social Share</title>
</head>
<body>
<h2>Custom Social Share Button with Callback</h2>
<button id="share-facebook">Share on Facebook</button>
<button id="share-twitter">Share on Twitter</button>
@mrtonyhuynh
mrtonyhuynh / wp-config.php
Created December 4, 2017 13:55 — forked from MikeNGarrett/wp-config.php
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
// Explicitely setting url
define( 'WP_HOME', 'http://domain.com' );
define( 'WP_SITEURL', 'http://domain.com' );
// Set url to... whatever.
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );