Skip to content

Instantly share code, notes, and snippets.

@ikawka
ikawka / MY_Session.php
Created November 28, 2012 03:47 — forked from zhouming/MY_Session.php
Use redis in Codeigniter Session.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Session extends CI_Session{
private $sess_use_redis = TRUE;
private $redis = '';
public function __construct($params = array()) {
//parent::__construct();
$this->CI =& get_instance();
@ikawka
ikawka / ikawka-gitlab-install
Created November 29, 2012 09:01
successfull gitlab install
_This installation guide created for Debian/Ubuntu and properly tested._
_Checkout requirements before setup_
### IMPORTANT
Please make sure you have followed all the steps below before posting to the mailing list with installation and configuration questions.
Only create a GitHub Issue if you want a specific part of this installation guide updated.
@ikawka
ikawka / gist:4174481
Created November 30, 2012 08:16
gitlab centos 5.8 86_64
su -
#dependcies
#centos 6.2 | http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-7.noarch.rpm
rpm -Uvh http://mirrors.ustc.edu.cn/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm
yum -y groupinstall 'Development Tools' 'Additional Development'
yum -y install readline readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel expat-devel db4-devel byacc sqlite-devel gcc-c++ libyaml libyaml-devel libffi libffi-devel libxml2 libxml2-devel libxslt libxslt-devel libicu libicu-devel system-config-firewall-tui python-devel redis
#wkhtmltoimage ge the amd64
http://code.google.com/p/wkhtmltopdf/wiki/compilation
#get binary
wget http://wkhtmltopdf.googlecode.com/files/wkhtmltoimage-0.11.0_rc1-static-amd64.tar.bz2
#extract
tar -xvf wkhtmltoimage-0.11.0_rc1-static-amd64.tar.bz2
#move to /usr/local/bin/
@ikawka
ikawka / gist:4983300
Created February 19, 2013 05:19
Simi-static Menu with JQuery
<ul class="shown">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<ul class="hidden">
<li class="more">...</li>
</ul>
</html>
@ikawka
ikawka / nginx php mysql
Last active December 15, 2015 02:09
nginx php mysql
# repositories
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# mysql
sudo yum install mysql mysql-server
sudo /etc/init.d/mysqld start
mysql_secure_intallation
# nginx
@ikawka
ikawka / ubuntu enable ssh
Last active December 15, 2015 02:09
ubuntu 12.04 LTS enable SSH
login as administrator
sudo apt-get install openssh-server
type y to accept
@ikawka
ikawka / Installing Node JS
Last active December 15, 2015 08:59
nodejs npm
# install required libraries
yum install g++ curl openssl-devel git-core
# or development group this will install about 90 items
# the above step will also do just fine
sudo yum groupinstall 'Development Tools'
# install nodejs
git clone git://github.com/ry/node.git
cd node
@ikawka
ikawka / MY_Session.php
Created May 29, 2013 03:22
Redis CI Session
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
This shoul be paired with https://github.com/joelcox/codeigniter-redis
*/
class MY_Session extends CI_Session{
@ikawka
ikawka / .gitignore
Created September 16, 2013 06:58 — forked from karmi/.gitignore
.DS_Store
*.log
tmp/