Skip to content

Instantly share code, notes, and snippets.

View kittinan's full-sized avatar
🇹🇭
:(){ :|:& };:

Kittinan kittinan

🇹🇭
:(){ :|:& };:
View GitHub Profile
@kittinan
kittinan / .gitlab-ci.yml
Created October 15, 2015 15:46
gitlab yml
before_script:
- composer install --prefer-dist
job1:
script:
- vendor/bin/phpunit tests/
@kittinan
kittinan / selenium-start-stop.sh
Last active October 15, 2015 07:28 — forked from alexnederlof/selenium-start-stop.sh
Selenium start-stop script
#!/bin/bash
# Note that this script requires you to have
# an X window running on Display :90
# This can be done by running: /usr/bin/Xvfb :90 -ac -screen 0 1024x768x8 &
#
# You can save this script as /etc/init.d/selenium to start and stop selenium
PORT=4444
DESC="Selenium server"
@kittinan
kittinan / 1_phpunit-api.md
Created October 14, 2015 05:12 — forked from loonies/1_phpunit-api.md
PHPUnit Cheat Sheet

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this->anything()
@kittinan
kittinan / zeal_install.sh
Created August 25, 2015 07:46
Ubuntu 14.04 shell script install zeal
#!/bin/bash
git clone https://github.com/zealdocs/zeal.git
cd zeal
sudo apt-get install libarchive-dev libxcb-keysyms1-dev libqt5webkit5-dev libqt5x11extras5-dev -y
sudo apt-get remove appmenu-qt5 -y
qmake
make
sudo make install
@kittinan
kittinan / palindrome.php
Created March 29, 2015 16:36
Largest palindrome product
<?php
/*
* Largest palindrome product
*/
$max = 0;
$output = null;
for ($i = 100; $i < 10000; $i++ ) {
for ($j = 100; $j < 10000; $j++) {
@kittinan
kittinan / docker_rm.sh
Created March 28, 2015 17:00
Docker: Remove all images and containers
#!/bin/bash
# Delete all containers
# http://techoverflow.net/blog/2013/10/22/docker-remove-all-images-and-containers/
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@kittinan
kittinan / WidgetUtil.java
Created March 21, 2015 19:12
Android Widget Recursive Clear Form
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.RadioGroup;
import android.widget.ScrollView;
/**
* Created by null on 3/22/15.
*/
@kittinan
kittinan / speaking.php
Created March 12, 2015 06:14
Codejam Qualification Round 2012 - Speaking in Tongues
<?php
$filename = 'A-small-practice.in';
$lines = file($filename);
$input_size = trim($lines[0]);
$map = array(
'a' => 'y',
'b' => 'h',
@kittinan
kittinan / .travis.yml
Created March 7, 2015 15:35
travis upload code coverage to scrutinizer
language: php
php:
- 5.5
- 5.4
- 5.3
- hhvm
before_script:
- wget http://getcomposer.org/composer.phar
- php composer.phar install --dev --no-interaction
@kittinan
kittinan / .scrutinizer.yml
Created March 7, 2015 15:25
php scrutinizer config
filter:
excluded_paths: [tests/*]
checks:
php:
code_rating: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true