Skip to content

Instantly share code, notes, and snippets.

View kilip's full-sized avatar
🏠
In Search of Enlightenment

Anthonius Munthi kilip

🏠
In Search of Enlightenment
View GitHub Profile
@kilip
kilip / FeatureContext.php
Created April 21, 2016 08:46 — forked from pbuyle/FeatureContext.php
Behat step-definition to verify visibility (not just presence) of Drupal form elements.
<?php
use Behat\Behat\Context\ClosuredContextInterface,
Behat\Behat\Context\TranslatedContextInterface,
Behat\Behat\Context\BehatContext,
Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode,
Behat\Gherkin\Node\TableNode;
/**
@kilip
kilip / README.md
Created October 21, 2016 00:29 — forked from tjamps/README.md
Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

The API we are creating in this gist will follow these rules :

  • The API only returns JSON responses
  • All API routes require authentication
  • Authentication is handled via OAuth2 with password Grant Type only (no need for Authorization pages and such).
  • API versioning is managed via a subdomain (e.g. v1.api.example.com)

The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :

@kilip
kilip / codeship-dokku-deploy.md
Last active November 14, 2016 13:20 — forked from bibstha/gist:49540af53fa0ec5ab869
Deploy to dokku from codeship.com

After migrating from heroku to dokku, we had to also chance codeship so we deploy to dokku. I followed the following steps to successfully deploy to dokku.

  1. Save the public key of the codeship project. It is found in Project Settings > General Settings.
  2. Copy the public key to a file /tmp/codeship_projectname.pub.
  3. Make sure when pasting, all the contents are in a single line and not multiple lines.
  4. Add the public key to dokku using the following command in console. Reference.
cat /tmp/codeship_projectname.pub | ssh root@yourdokkuinstance "sudo sshcommand acl-add dokku [description]"
@kilip
kilip / phplist-uat.md
Last active February 6, 2018 03:54
Behat PHPList Setup

New Development Requirements

To make selenium easier to be used by developer this 2 packages added into dev dependencies:

  • enm1989/chromedriver
  • se/selenium-server-standalone

New bash script bin/start-selenium added, so developer can start selenium by using this command:

# cd path/to/phplist3
$ bin/start-selenium
@kilip
kilip / arch-linux-gnome-install
Last active April 7, 2018 02:31 — forked from thacoon/arch-linux-gnome-install
Install a minimal gnome setup and some more useful things
# Install Gnome and some other useful thins
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# And based on https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger
# I have just copied commands from https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger#Weitere_notwendige_Dienste
# It's just to have it with one view after doing a [fresh installation](https://gist.github.com/thacoon/05d5a39606ab554455d6713e8a714b2c)
# Some useful services
pacman -S acpid ntp dbus avahi cups cronie ntp
@kilip
kilip / keyboard-as-mouse.md
Last active April 20, 2018 10:36
keyboard as mouse
set $mod Mod4
set $mod2 Mod1

mode "mouse" {

    # set your three speeds here

    set $slow 1
# .config/i3/config
set $mod Mod4
set $alt Mod1
font pango:Segoe UI 8
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# class border backgr. text
@kilip
kilip / module-checklist.md
Last active November 5, 2018 11:22
Yawik module checklist
  • symlink sandbox/config
  • check coveralls config
  • fix behat config
  • check module config
  • ignores composer.lock
  • fix travis coverage upload
  • check README.md build status to master
  • check .travis/phpenv.ini
@kilip
kilip / gist:62bfb11f0dd05b91f0a2c8caaee923c0
Created November 6, 2018 06:15
behat selenium wait for steps
class FeatureContext extends MinkContext {
/**
* @Given /^I wait for css element "([^"]+)" to (appear|disappear)$/
*/
public function iWaitForCssElement($element, $appear)
{
$xpath = $this->getSession()->getSelectorsHandler()->selectorToXpath('css', $element);
$this->waitForXpath($xpath, $appear == 'appear');
}
@kilip
kilip / release-check.md
Last active November 13, 2018 03:51
Release Checklist

convert branch alias to: