Skip to content

Instantly share code, notes, and snippets.

View buonzz's full-sized avatar

Darwin Biler buonzz

View GitHub Profile
@buonzz
buonzz / json_hatoeas.json
Created July 7, 2014 00:29
json with hatoeas
{
"name":"Darwin Biler",
"id": "123",
"date_created": "2009-12-12",
"href": "http://domain.com/account/123",
"transactions":[
"href": "http://domain.com/transaction/7897",
"href": "http://domain.com/transaction/7897",
"href": "http://domain.com/transaction/7897",
"href": "http://domain.com/transaction/7897"
@buonzz
buonzz / homestead-open-port.sh
Created August 7, 2014 13:27
make homestead accessible across the network - CENTOS
vim /etc/sysconfig/iptables
#look for this line in the file
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
# then copy that and change 80 to 8000
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8000 -j ACCEPT
#press escape and type
:q
@buonzz
buonzz / create_record.js
Created August 12, 2014 00:47
Create a new record in MongoDB
conn = new Mongo();
db = conn.getDB("db1");
db.greetings.insert({
"message": "Hello World"
});
print("I create a new record in greetings collection in db1 database");
@buonzz
buonzz / execute_js.sh
Created August 12, 2014 00:52
Execute a js file in MongoDB
mongo localhost:27017/db1 create_record.js
@buonzz
buonzz / satis.sh
Created August 23, 2014 21:23
satis setup
#1 create a json config file
#2 make sure date.timezone is set
php --ini
#3 build the packages
php bin/satis build config.json web/ --no-interaction
@buonzz
buonzz / add_service.php
Created August 24, 2014 01:56
add service provider in laravel dynamically
App::register('MyApp\Providers\MyServiceProvider');
@buonzz
buonzz / sample_readme.txt
Last active August 29, 2015 14:05
sample readme
FreeGeoIP for Laravel 4
=======================
[![Build Status](https://travis-ci.org/buonzz/laravel-4-freegeoip.svg?branch=master)](https://travis-ci.org/buonzz/laravel-4-freegeoip)
[![Latest Stable Version](https://poser.pugx.org/buonzz/laravel-4-freegeoip/v/stable.svg)](https://packagist.org/packages/buonzz/laravel-4-freegeoip) [![Total Downloads](https://poser.pugx.org/buonzz/laravel-4-freegeoip/downloads.svg)](https://packagist.org/packages/buonzz/laravel-4-freegeoip)
[![Latest Unstable Version](https://poser.pugx.org/buonzz/laravel-4-freegeoip/v/unstable.svg)](https://packagist.org/packages/buonzz/laravel-4-freegeoip) [![License](https://poser.pugx.org/buonzz/laravel-4-freegeoip/license.svg)](https://packagist.org/packages/buonzz/laravel-4-freegeoip)
Laravel 4 Library for calling http://freegeoip.net/ API.
In contrary to all other packages wherein it requires that you have the geoip database in your filesystem, this library calls a free service
@buonzz
buonzz / satis_repo.json
Created August 30, 2014 09:50
Buonzz Satis repo
{
"repositories": [
{
"type": "composer",
"url": "http://packages.buonzz.com"
}
]
}
@buonzz
buonzz / laravel-buonzz-repo.sh
Created August 30, 2014 13:44
create laravel project from buonzz repo
composer create-project laravel/laravel myproject --repository-url=http://packages.buonzz.com
@buonzz
buonzz / composer.json
Created August 30, 2014 15:55
install symfony console from buonzz repo
{
"require": {
"symfony/console": "*"
},
"repositories": [
{"packagist": false},
{ "type": "composer", "url": "http://packages.buonzz.com/"}
]
}