Skip to content

Instantly share code, notes, and snippets.

View pandaskii's full-sized avatar

Joseph Z pandaskii

View GitHub Profile

Install dnsmasq with brew:

$ brew install dnsmasq

Setup *.test hosts with:

$ echo 'address=/.test/127.0.0.1' >> /opt/homebrew/etc/dnsmasq.conf

If want to use other device to resolv nameserver ( default only 127.0.0.1 )

@pandaskii
pandaskii / dnsmasq-setup.md
Created July 20, 2022 03:59 — forked from gdestree/dnsmasq-setup.md
Setup dnsmasq on OS X *updated for .test

Never touch your local /etc/hosts file in OS X again

UPDATED for .test

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

@pandaskii
pandaskii / plink-plonk.js
Created February 17, 2020 01:52 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@pandaskii
pandaskii / mailhog-mamp.md
Created December 11, 2019 10:06 — forked from jaredatch/mailhog-mamp.md
Install MailHog with MAMP Pro

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update
#Create, update and blog post into a Confluence Wiki with Python. You'll have to
#provide the server and user credentials
import sys
from xmlrpclib import Server
user = "username"
passwd = "passwd"
serverurl = "https://server.example.com/rpc/xmlrpc"
spacekey = "demospace"
@pandaskii
pandaskii / Remove all git tags
Created August 26, 2017 02:57 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@pandaskii
pandaskii / GoogleDriveServiceProvider.php
Created July 5, 2017 08:09 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
# The bare minimum to get a decent terminal setup for work
echo "Opening apps to download..."
echo ""
echo "iTerm 2"
open https://iterm2.com/downloads/stable/latest
echo "Chrome"
open https://www.google.com.au/chrome/browser/desktop/
echo "Firefox"
open https://www.mozilla.org/firefox/new/?scene=2
echo "MAMP"
@pandaskii
pandaskii / mySampleMenusMigration.class.php
Created October 7, 2016 00:22 — forked from abulte/mySampleMenusMigration.class.php
Drupal menu creation with Migrate module from a CSV file - Got it from Google Cache of this page: http://www.mezasefi.com/d/en/blogs/nobu/2012-10-02/sample-migration-module-importing-menu-csv.html
<?php
class mySampleMenusMigration extends Migration {
public function __construct() {
parent::__construct(MigrateGroup::getInstance('mySampleMenusMigration'));
$this->description = t('Creates sample menues.');
// the csv file contains the header.
$dir = drupal_get_path('module', 'mySampleMigrate');
$this->source = new MigrateSourceCSV("$dir/sample_menus.csv", array(), array('header_rows' => 1));

How To Install Memcache on MAMP 2

  1. Install memcached. I'd suggest using homebrew. brew install memcached
  2. Select your desired version of PHP that you'd like to use in MAMP. This dropdown is located in the PHP tab in MAMP PRO.
  3. Visit the Downloads Page on php.net and download the source code. If your release isn't listed, visit the Releases page.
  4. Extract the source into /Applications/MAMP/bin/php/[php version folder]/include/php.
  5. /Applications/MAMP/bin/php/[php version folder]/include/php/configure
  6. /Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcache.
  7. Add extension=memcache.so to your php.ini
    • MAMP Pro: /Applications/MAMP\ Pro/MAMP\ PRO.app/Contents/Resources/php[your php version].ini