- Name: vagrant-centos
- Operating System: Linux
- Version: Red Hat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: | |
* if the separator is a slash (/), then the American m/d/y is assumed; | |
* whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed. | |
*/ | |
strtotime('12/25/2014'); | |
strtotime('25-12-2014'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style type="text/css"> | |
.container-block { | |
display: block; | |
position: relative; | |
background: #ccc; /* For visualization */ | |
width: 500px; /* Changeable */ | |
height: 500px; /* Changeable */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class A | |
{ | |
protected $knownTypes = [ | |
'application/json' => true, | |
'application/xml' => true, | |
'text/xml' => true, | |
'text/html' => true, | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>TODO supply a title</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> | |
<body> | |
<div style="width:0; height:0; overflow:hidden;"> | |
<iframe id="launch_frame" name="launch_frame"></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install git and gource | |
# get a branch of git | |
# create gource video | |
$ sudo apt-get install bzr gource | |
$ git clone git@github.com:oanhnn/slim-skeleton.git project_dir | |
$ cd project_dir | |
$ git checkout master | |
$ gource \ |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
Hướng dẫn đơn giản để triển khai ứng dụng Laravel và Lumen trên shared hosting.
Before trying to deploy a Laravel application on a shared hosting, you need to make sure that the hosting services provide a fit requirement to Laravel. Basically, following items are required for Laravel 5.2: Trước khi thực hiện triển khai ứng dụng Laravel trên shared hosting, bạn cần đảm bảo nhà cung cấp dịch vụ cho bạn môi trường với các yêu cầu cần thiết cho Laravel. Về cơ bản, yêu cầu cho Laravel 5.2 như sau:
- PHP >= 5.5.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
VERSION=${1:-0.12.4} | |
yum -y install fontconfig libXrender libXext xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi freetype libpng zlib libjpeg-turbo openssl icu | |
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/${VERSION}/wkhtmltox-${VERSION}_linux-generic-amd64.tar.xz --dns-timeout=5 --connect-timeout=5 | |
tar -xJf wkhtmltox-${VERSION}_linux-generic-amd64.tar.xz | |
cp wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf | |
cp wkhtmltox/bin/wkhtmltoimage /usr/local/bin/wkhtmltoimage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_array_diff($a, $b) | |
{ | |
$map = $out = array(); | |
foreach ($a as $val) | |
$map[$val] = 1; | |
foreach ($b as $val) | |
if (isset($map[$val])) | |
$map[$val] = 0; |
OlderNewer