Skip to content

Instantly share code, notes, and snippets.

Avatar
🌏
Working from Asia

Imran Ismail imranismail

🌏
Working from Asia
View GitHub Profile
@imranismail
imranismail / Jquery Ajax And Laravel
Last active Aug 29, 2015
Laravel + Jquery Ajax .post
View Jquery Ajax And Laravel
//Javascript
$(function()
{
var BASE_URL = window.location.protocol + '//' + window.location.host;
$("#buttonselector").click(function() {
var data = {
'inputelementname' : $('#inputelementselector').val(),
};
@imranismail
imranismail / config.yaml
Created Dec 6, 2014
puphpet.com config.yaml for Rails development vagrant box
View config.yaml
---
vagrantfile-local:
vm:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
hostname: ''
memory: '512'
cpus: '1'
chosen_provider: virtualbox
network:
@imranismail
imranismail / Dash.js
Last active Aug 29, 2015
2D Platformer Experimentation in Unity Game Engine. Visit this link to try it out http://goo.gl/QHT6pp
View Dash.js
#pragma strict
var dashButton = "Fire1";
var dashPower : float = 300f;
var facingRight : boolean = false;
function Start () {
}
function Update () {
View anon-llama.rb
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"
View gist:71524c0154531e9a6b8b
---
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 Apr 8, 2015
WP_Query for gettings multiple post type in multiple taxonomy
View gist:dbdeeac4211633d58892
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'
]);
View gist:73c7bbc52a94ba10b267
#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 Jul 10, 2015
How to setup middleman on OSX 10.10
View README.md

Getting Started

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