Skip to content

Instantly share code, notes, and snippets.

View imranismail's full-sized avatar

Imran Ismail imranismail

View GitHub Profile
@imranismail
imranismail / Jquery Ajax And Laravel
Last active August 29, 2015 14:00
Laravel + Jquery Ajax .post
//Javascript
$(function()
{
var BASE_URL = window.location.protocol + '//' + window.location.host;
$("#buttonselector").click(function() {
var data = {
'inputelementname' : $('#inputelementselector').val(),
};
@imranismail
imranismail / config.yaml
Created December 6, 2014 07:07
puphpet.com config.yaml for Rails development vagrant box
---
vagrantfile-local:
vm:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
hostname: ''
memory: '512'
cpus: '1'
chosen_provider: virtualbox
network:
@imranismail
imranismail / anon-llama.rb
Created December 9, 2014 14:16
Anonymooooose Llama
def anonymous_llama(min, max)
for i in min..max
if (i % 3 == 0)
puts "Anonymous"
else
puts i
end
if (i % 5 == 0)
puts "Llama"
@imranismail
imranismail / Dash.js
Last active August 29, 2015 14:11
2D Platformer Experimentation in Unity Game Engine. Visit this link to try it out http://goo.gl/QHT6pp
#pragma strict
var dashButton = "Fire1";
var dashPower : float = 300f;
var facingRight : boolean = false;
function Start () {
}
function Update () {
vagrant box add laravel/homestead
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
hosts_file_additions: true
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
@imranismail
imranismail / gist:dbdeeac4211633d58892
Created April 8, 2015 07:03
WP_Query for gettings multiple post type in multiple taxonomy
get_posts([
'post_type' => ['headline', 'event'],
'numberposts' => 5,
'tax_query' => [
'relation' => 'OR',
['taxonomy' => 'event-category', 'field' => 'slug', 'terms' => 'featured'],
['taxonomy' => 'headline-categories', 'field' => 'slug', 'terms' => 'featured']
],
'order' => 'DESC'
]);
#Insall Ajenti
apt-get update
wget http://repo.ajenti.org/debian/key -O- | apt-key add -
echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list
apt-get update
apt-get install ajenti
service ajenti restart
# Uninstall Apache2
sudo apt-get autoremove && sudo apt-get remove apache2*
@imranismail
imranismail / README.md
Created July 10, 2015 06:45
How to setup middleman on OSX 10.10

Getting Started

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Install rbenv and ruby-build
@imranismail
imranismail / UrlParser.php
Last active September 17, 2015 10:43
UrlParser.php
<?php
class UrlParser
{
/**
* The url to be parsed
* @param String $url
*/
public function __construct($url)
{