Skip to content

Instantly share code, notes, and snippets.

View apirak's full-sized avatar

Apirak Panatkool apirak

View GitHub Profile
@apirak
apirak / Candidate.md
Last active December 23, 2015 06:59

#Geeky Pod

##Checkin

####Python

  • Chaiwat Suttipongsakul
  • Chokchai Phatharamalai <<
  • Airmee Chanita Anuwong
  • Pam Suebvisai
  • Edkung Foo

Install php on CentOS

Vagrant file

config.vm.network :forwarded_port, guest: 80, host: 8081
config.vm.network :forwarded_port, guest: 3306, host: 3381

Install software

sudo yum install curl ftp rsync sudo time wget which git-core

How to install Nginx Mysql and PHP on Ubuntu

  1. Set root by default

    $ sudo -s

  2. Make sure that we use last update of apt-get

    $ apt-get update

<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 559 783" width="559pt" height="783pt">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:date>2012-05-10 01:04Z</dc:date>
<!-- Produced by OmniGraffle Professional 5.3.6 -->
</metadata>
<defs>
<filter id="Shadow" filterUnits="userSpaceOnUse">
<feGaussianBlur in="SourceAlpha" result="blur" stdDeviation="3.488" />
<feOffset in="blur" result="offset" dx="0" dy="4" />
@apirak
apirak / gist:2497342
Created April 26, 2012 08:00
opendream about page
<div>
<h2>About Opendream</h2>
<p>
<img src="http://opendream.co.th/sites/all/themes/opendream/images/dreamer-03.png" />
Information is power. Opendream weaving information systems to your control, excelling the power of your organization.<br/>
<br/>
We are a social enterprise with expertise in Internet solution development and information design. All the Opendream crews are digital natives from diverse backgrounds and experiences, with one single bold aim — deliver the information, change the world.<br/>
</p>
<p>
<img src="http://opendream.co.th/sites/all/themes/opendream/images/dreamer-04.png" />
@apirak
apirak / gist:2497293
Created April 26, 2012 07:49
opendream services page
<div>
<h1>services</h1>
<p>
Opendream services bring Internet technology to our client-friends and non-profit organisations.<br/>
<br/>
We commit a long term partnership, support those to utilise the power of the Internet for their organisation in sustainably way, provide innovative Internet applications on powerful open platform, connect people together, and save the world.<br/>
<br/>
Our social-mind-passion-driven technologists are so keen on Internet technology adaptation for social impact, we're unique.
</p>
</div>
@apirak
apirak / meta_currency.rb
Created March 23, 2012 15:02
Meta programming example with currency expert
currency = {usd: 1, baht: 30.73, yen: 83.447, rupee: 50.21}
[Float, Fixnum].each do |number|
currency.each do |key, value|
number.class_eval "def #{key};
return self/#{value};
end"
number.class_eval %{def #{key}_string;
return (self * #{value}).to_s+" #{key.upcase}";
end}
@apirak
apirak / hangman.rb
Created March 23, 2012 14:51
Hangman game with class, yield and self
require_relative 'hangman_class_3'
hangman = Hangman.new
hangman.start do |h|
puts h.answer
print "#{h.limit} Enter your best guest: "
h.guess(gets)
end
@apirak
apirak / hangman.rb
Created March 23, 2012 14:49
Hangman game with class and yield
require_relative 'hangman_class_2'
hangman = Hangman.new
hangman.start do
puts hangman.answer
print "#{hangman.limit} Enter your best guest: "
hangman.guess(gets)
end
@apirak
apirak / hangman.rb
Created March 23, 2012 14:42
Hangman game with simple class
require_relative 'hangman_class'
hangman = Hangman.new
hangman.start
until hangman.finish
puts hangman.answer
print "#{hangman.limit} Enter your best guess: "
hangman.guess(gets)