Skip to content

Instantly share code, notes, and snippets.

Working from home

Didin Ahmadi didinahmadi

Working from home
View GitHub Profile
didinahmadi / gist:5f660ba3a984640ca9d7e73e263a3382
Created Aug 15, 2019 — forked from rolinger/gist:d6500d65128db95f004041c2b636753a
PHP => FCM Push notification tutorial for Android and iOS
View gist:5f660ba3a984640ca9d7e73e263a3382
Below is a full tutorial on how to setup and use Googles Firebase push notification API for both Android and iOS. It is based on this
earlier implementation of Googles GCM method: - FCM is the new method and GCM will eventually be
Register your app in the FCM Console: (add project)
1. Click on the newly added project, in the upper left menu is the "Overview" and Gear Settings.
2. Click on the GEAR settings icon, and then on "Project Settings"
3. In the main screen, click on "Cloud Messaging"
didinahmadi / gist:8097573495bcd6a24fae347b1afbc9ca
Created Aug 14, 2019 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
View gist:8097573495bcd6a24fae347b1afbc9ca
// API access key from Google API's Console
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
didinahmadi / nuxt.config.js
Created Jun 6, 2019 — forked from mjgartendev/nuxt.config.js
An example nuxt.config.js file heavily commented from the nuxt and vue-meta documentation examples
View nuxt.config.js
module.exports = {
Headers of the page
- Nuxt.js uses vue-meta to update the headers and html attributes of your application.
- Nuxt.js configures vue-meta with these options:
keyName: 'head', // the component option name that vue-meta looks for meta info on.
attribute: 'data-n-head', // the attribute name vue-meta adds to the tags it observes
ssrAttribute: 'data-n-head-ssr', // the attribute name that lets vue-meta know that meta info has already been server-rendered
tagIDKeyName: 'hid' // the property name that vue-meta uses to determine whether to overwrite or append a tag
didinahmadi /
Created Feb 28, 2019 — forked from santisbon/
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

View composer custome script
"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"
View gist:652f669e6a63ebd267642e5ea0adb7a2
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
View gist:0cafb9c2be792b7b96f7d2327094416a
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
didinahmadi / VagrantFile
Created Nov 28, 2018 — forked from ricardocanelas/VagrantFile
Vagrant / PHP7.1 + MySQL5.6 + Apache
View VagrantFile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config| = "ubuntu/trusty64" "private_network", ip: ""
config.vm.synced_folder "./www", "/var/www/", :nfs => { :mount_options => ["dmode=777","fmode=666"] }
didinahmadi / default.conf
Created Nov 30, 2016
nginx config - dynamic virtual hosts
View default.conf
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}";
View blog-post-2
didin@didin-ubuntu:$ heroku list
=== My Apps
didin@didin-ubuntu:$ git remote -v
heroku (fetch)
heroku (push)
You can’t perform that action at this time.