Skip to content

Instantly share code, notes, and snippets.

View gcamrit's full-sized avatar

Amrit G.C. gcamrit

View GitHub Profile
@gcamrit
gcamrit / composer.md
Created April 14, 2017 13:24 — forked from xeoncross/composer.md
How composer actually works

Composer

the missing quick-start guide

We will assume we have a package/project called https://github.com/foo/bar

Most redistributable packages are hosted on a version control website such as Github or Bitbucket. Version control repositories often have a tagging system where we can define stable versions of our application. For example with git we can use the command:

git tag -a 1.0.0 -m 'First version.'

With this we have created version 1.0.0 of our application. This is a stable release which people can depend on. If we wanted to include "foo/bar" then we could create a composer.json and specify the tagged release we wanted:

@gcamrit
gcamrit / phpb
Created December 29, 2015 10:16 — forked from gedex/phpb
Build multiple PHP versions
#!/bin/bash
#
# Build multiple PHP versions. Inspired by
# http://derickrethans.nl/multiple-php-version-setup.html
# This script assumes you have Git and build tols installed.
#
# Author: Akeda Bagus <admin@gedex.web.id>
# Licensed under MIT license.
# To reduce outgoing request, clone from
/**
* Created by amrit on 2/12/15.
*/
var plan = require('flightplan');
plan.target('demo-beehrm', [
{
host: 'host',
username: 'username',
password: 'password',
agent: process.env.SSH_AUTH_SOCK
echo ">>> Starting install script"
sudo yum -y update
echo ">>> Installing Apache, MySQL and PHP"
sudo rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
sudo yum install -y nano git-core httpd php55w php55w-common php55w-mysql php55w-mcrypt php55w-gd
sudo yum install -y yum-plugin-replace
sudo yum replace -y mysql-libs --replace-with mysql55w-libs
sudo yum install -y mysql55w mysql55w-server
$.ajax({
type: 'GET',// you can use post also :P
url: ajax.php, // your ajax controller file here
dataType: 'json',
data: { firstcol: firstcol, secondcol: secondcol, thirdcol: thirdcol,id: id,updatecol:true },
beforeSend: function () {
// here we append a loading image
},
success: function (data) {
// successful request; do something with the data