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
<?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
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
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
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)
@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}";
@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"] }
#!/bin/bash
sudo service apache2 stop -y
sudo apt remove apache2.* -y
sudo apt-get remove apache2 -y
sudo apt-get autoremove -y
sudo apt-get purge apache2 -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
#!/bin/bash
sudo service apache2 stop -y
sudo apt remove apache2.* -y
sudo apt-get remove apache2 -y
sudo apt-get autoremove -y
sudo apt-get purge apache2 -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
...
"scripts": {
"test": [
"DB_DATABASE='gokun-testing' APP_ENV='testing'",
"DB_DATABASE='gokun-testing' APP_ENV='testing' php artisan migrate:fresh",
"DB_DATABASE='gokun-testing' APP_ENV='testing' php artisan db:seed",
"DB_DATABASE='gokun-testing' APP_ENV='testing' php ./vendor/bin/phpunit --verbose --debug"
]
},
@didinahmadi
didinahmadi / Update-branch.md
Created February 28, 2019 07:05 — forked from santisbon/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master