Skip to content

Instantly share code, notes, and snippets.

View kittinan's full-sized avatar
🇹🇭
|||

Kittinan kittinan

🇹🇭
|||
View GitHub Profile
@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 / 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 / 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 / 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-&gt;anything()
@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 / .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 / sensor.sh
Created March 12, 2016 14:48
sensor for orange pi
#/bin/bash
while (true); do
cpu_cur=$(( `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq` / 1000 ))
cpu_max=$(( `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq` / 1000 ))
cpu_min=$(( `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq` / 1000 ))
cpu_cur="$(printf "%4s" $cpu_cur)"
cpu_max="$(printf "%4s" $cpu_max)"
cpu_min="$(printf "%4s" $cpu_min)"
tempr=`cat /sys/devices/virtual/hwmon/hwmon1/temp1_input`
tempr="$(printf "%3s" $tempr)"
#!/bin/bash
# Get the device id of the Synaptics TouchPad
id=12
# Get the current state of the Device Enabled property
# The devString will look like: "Device Enabled (132): 0"
devString=$(xinput --list-props $id | grep "Device Enabled")
# Parse the devString into an array
read -a devString_array <<< "$devString"
#!/bin/bash
#################################################
# This Script will Audit PHP For basic Security
# Author:- Kaustubh Padwad
#################################################
echo "Please Enter The Path Of php in front of script"
#Expose php This should be OFF
GPASS="php Expose"

Keybase proof

I hereby claim:

  • I am kittinan on github.
  • I am kittinan (https://keybase.io/kittinan) on keybase.
  • I have a public key whose fingerprint is 0CA4 6DAF 3735 4AEE BC83 2853 2D67 4B7A BE39 EBA8

To claim this, I am signing this object: