Skip to content

Instantly share code, notes, and snippets.

View adnnor's full-sized avatar
🎯
Focusing

Adnan Shahzad adnnor

🎯
Focusing
View GitHub Profile
@navid-taheri
navid-taheri / eb-cli-ubuntu-16-04
Last active July 6, 2023 14:19
How to install eb cli (awsebcli) on Ubuntu 16.04
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install python3-setuptools
sudo easy_install3 pip
pip -V
#pip 9.0.1 from /usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg (python 3.5)
sudo chown -R username:username ~/.local/
# add to ./*shrc
@elucify
elucify / gist:c7ccfee9f13b42f11f81
Created January 23, 2015 17:17
BASH: set variables for ANSI text color escape sequences
RESTORE=$(echo -en '\033[0m')
RED=$(echo -en '\033[00;31m')
GREEN=$(echo -en '\033[00;32m')
YELLOW=$(echo -en '\033[00;33m')
BLUE=$(echo -en '\033[00;34m')
MAGENTA=$(echo -en '\033[00;35m')
PURPLE=$(echo -en '\033[00;35m')
CYAN=$(echo -en '\033[00;36m')
LIGHTGRAY=$(echo -en '\033[00;37m')
LRED=$(echo -en '\033[01;31m')
@mattzuba
mattzuba / 01_httpd_phpfpm.config
Last active December 20, 2022 19:53
Apache 2.4 / PHP-FPM 5.5 on Amazon Elastic Beanstalk
packages:
yum:
php55-fpm: []
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/26_phpfpm_config.sh":
mode: "000755"
owner: root
group: root
content: |
@neave
neave / phone-headers.php
Created January 25, 2012 10:30
Mobile phone headers PHP example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=yes, minimum-scale=1.0">
<title>And your phone number is...</title>
<style>
body {
font: 17px sans-serif;
color: #444;
@tylerreed
tylerreed / controller.php
Created November 25, 2011 01:16
Valums AJAX File Uploader for CodeIgniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class My_Controller extends CI_Controller {
public function upload_files()
{
if ($this->input->get('qqfile'))
{
$file = $this->input->get('qqfile');
}