Skip to content

Instantly share code, notes, and snippets.

View didinahmadi's full-sized avatar
🏠
Working from home

Didin Ahmadi didinahmadi

🏠
Working from home
View GitHub Profile
@didinahmadi
didinahmadi / VagrantFile
Created November 28, 2018 07:48 — forked from ricardocanelas/VagrantFile
Vagrant / PHP7.1 + MySQL5.6 + Apache
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.100.100"
config.vm.synced_folder "./www", "/var/www/", :nfs => { :mount_options => ["dmode=777","fmode=666"] }
@didinahmadi
didinahmadi / default.conf
Created November 30, 2016 12:59
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";
didin@didin-ubuntu:$ heroku list
=== My Apps
ancient-springs-9053
arcane-coast-2987
frozen-ocean-2884
immense-citadel-3575
didin@didin-ubuntu:$ git remote -v
heroku https://git.heroku.com/secret-ocean-9491.git (fetch)
heroku https://git.heroku.com/secret-ocean-9491.git (push)
didin@didin-ubuntu:$ git push heroku master
remote: ! No such app as secret-ocean-9491.
fatal: repository 'https://git.heroku.com/secret-ocean-9491.git/' not found
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gcc autoconf bison flex libtool make libboost-all-dev libcurl4-openssl-dev curl libevent-dev uuid-dev
cd ~
wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz
<?php
/**
* imap-attachment.php
*
* @author hakre <hakre.wordpress.com>
* @link http://stackoverflow.com/questions/9974334/how-to-download-mails-attachment-to-a-specific-folder-using-imap-and-php
*/
/**
* Utility Class