Skip to content

Instantly share code, notes, and snippets.

"config": {
"process-timeout": 180000,
"github-protocols": ["https","http"],
"github-oauth": {
"github.com": "234669724c517d484e51724c517d484e51"
}
}
files:
"/etc/httpd/conf.d/vhost.conf":
mode: "000644"
owner: root
group: root
encoding: plain
content: |
NameVirtualHost *:80
#
<VirtualHost *:80>
@hemc4
hemc4 / Yii2_eb_ext.config
Created April 22, 2016 10:51
Yii2 Elastic Beanstalk configration for advance template
commands:
01cacheClear:
command: rm -rf ~/.composer
02updateComposer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update 1.0.0-alpha11
03globalrequired:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar global require fxp/composer-asset-plugin:1.1.3
@hemc4
hemc4 / Beanstalk config file
Last active November 6, 2015 18:32
Benstalk config for Autoscaling LAMP application deployment
branch-defaults:
master:
environment: cdv-core-debug
global:
application_name: cdv-core
default_ec2_keyname: hem-sg-pg
default_platform: 64bit Amazon Linux 2015.09 v2.0.4 running PHP 5.6
default_region: us-east-1
profile: hemc-root
sc: git
@hemc4
hemc4 / capistano_3_deploy_PHP_Yii_boilerplate
Last active August 29, 2015 14:11
Capistrano 3 deployment script for Yii boilerplate
set :user, "ubuntu"
set :group, "www-data"
server "54.169.xx.xx",roles: %w{web app db}, :primary => true
server "54.179.xx.xx",roles: %w{web app db}
#server "54.169.xx.xx",roles: %w{web app db}
#server "54.169.xx.xx",roles: %w{web app db}
#server "54.169.xx.xx",roles: %w{web app db}
@hemc4
hemc4 / Facebook_tab_remove_scroll_bar
Created June 27, 2014 09:08
Facebook tab Remove scrollbar
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'XXXXXXXXXX', // App ID
channelUrl : '//www.domain.com/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
@hemc4
hemc4 / Node.js AWS DynamoDb Scan Example
Created June 14, 2014 07:21
Node.js AWS DynamoDb Scan Example
var AWS = require('aws-sdk');
AWS.config.loadFromPath('./aws.config.json');
var dd = new AWS.DynamoDB();
var tableName = 'session';
var keyName='id';
function getSession() {
var db = new AWS.DynamoDB();
db.client.scan({
@hemc4
hemc4 / Wordpress on Nginx as frontend proxy and apache as backend
Last active August 29, 2015 14:01
Upgrade from Nginx+wordpress to Nginx->Apache + Wordpress
Stop Nignx
sudo service nginx stop
Edit nginx config
server {
listen 80;
root /usr/share/nginx/www/www.gtl.com;
ls
sudo apt-get update
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
sudo nano /etc/apache2/mods-enabled/dir.conf
cd /var/www/html/
ls
sudo service apache2 restart
ls
sudo nano info.php