Skip to content

Instantly share code, notes, and snippets.

View zeroc0d3's full-sized avatar
👌
Building Awesome Time (Infrastructure As Code)

Dwi Fahni Denni (dfdenni) zeroc0d3

👌
Building Awesome Time (Infrastructure As Code)
View GitHub Profile
@zeroc0d3
zeroc0d3 / install.md
Created April 23, 2016 11:31 — forked from zaherg/install.md
a small tips to install latest nginx , php 5.5 & laravel 4.1 since that Laravel 4.1 has been released, i have removed the line which explain how to install laravel from dev branch using composer.

Creating Your Laravel & nginx Server

We will install Larave 4.1 with PHP5.5 & Latest nginx on Ubuntu 12.04.3 x64.

updating your system

apt-get update && apt-get upgrade
adduser [username]
usermod -aG sudo [username]
apt-get -y install git
@zeroc0d3
zeroc0d3 / .htaccess
Created October 20, 2016 02:02
CI: Simple .htaccess using mod_rewrite for CodeIgniter
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
@zeroc0d3
zeroc0d3 / Guzzle.php
Created October 20, 2016 16:17
Load Guzzle library in CodeIgniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Guzzle
{
public function __construct()
{
require_once APPPATH . 'third_party/guzzle/autoloader.php';
@zeroc0d3
zeroc0d3 / ubuntu_agnoster_install.md
Created October 23, 2016 02:49 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 14.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@zeroc0d3
zeroc0d3 / Zsh & theme
Created October 23, 2016 02:55 — forked from leemour/Zsh & theme
Zsh installation and Agnoster theme settings
# Railscast
http://railscasts.com/episodes/308-oh-my-zsh
# Install Zsh
sudo apt-get update && sudo apt-get install zsh
# Install Oh-my-zsh
wget –no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | sh
# Make ZSH default shell
@zeroc0d3
zeroc0d3 / oauth2_mac_client_example.rb
Created October 31, 2016 17:15 — forked from herestomwiththeweather/oauth2_mac_client_example.rb
Example code to make hmac signed oauth2 requests
require 'uri'
require 'cgi'
require 'net/https'
require 'json'
require 'oauth2_mac_client'
# oauth2_mac_client gem at https://github.com/herestomwiththeweather/oauth2_mac_client
# usage using this test class:
# > client = OAuth2Client.new
# > client.get_token('refresh_token') # get a new MAC type access token
@zeroc0d3
zeroc0d3 / .gitignore
Last active November 2, 2016 23:37
Git ignore file for Laravel, CodeIgniter & Slim PHP Framework
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@zeroc0d3
zeroc0d3 / set_permission.sh
Created November 2, 2016 23:56
Set default permission folder & file in Laravel PHP Framework
#!bin/sh
find ~/repos/mylaravel.app -type d -exec sudo chmod 755 {} \;
find ~/repos/mylaravel.app -type f -exec sudo chmod 644 {} \;
sudo chmod 777 -R storage
sudo chmod +x set_permission.sh
@zeroc0d3
zeroc0d3 / set_gulp.sh
Created November 2, 2016 23:57
Set gulp production in Laravel PHP Framework
#!bin/sh
gulp --production
php artisan cache:clear
php artisan view:clear
@zeroc0d3
zeroc0d3 / describe-it.js
Created November 17, 2016 12:06 — forked from shamasis/describe-it.js
mocha/jasmine compatible test framework for postman test scripts (in less than 1KB minified)
/**
* @module describe-it
*
* This module defines global variables to provide unit test case runner functions compatible with mocha and jasmine.
* The codebase is written for brevity and facilitate being as lightweight as possible.
*
* The code is intended to be included in Postman Test Sandbox.
*/
/**