Wednesday, June 25, 2014

Test aja

def isVolNaik = volume[1] < volume;
def isLidiAtasLemah = (((high - close) * 100 / (close - low)) < 50);
def isMACDNaik = MACD(8, 17, 9, "EMA").diff > 0;

Wednesday, June 4, 2014

Install wine 1.4 on Debian Sqeezy (not tested)

Edit your /etc/apt/sources.list by adding the following:

deb http://main.mepis-deb.org/mepiscr/repo/ mepis85cr main
Mepis is a Linux distro based on the stable branch of Debian, but it comes with more updated binaries (wine included).

Edit your /etc/apt/preferences file (or create it if it doesn’t exist):

Package: *
Pin: release n=squeeze
Pin-Priority: 900
Package: *
Pin: release n=mepis85cr
Pin-Priority: 200
This will allow you to choose from which repository to install new packages. By default the squeeze packages will be used.

Now from a console type:

:~$ sudo apt-get update
:~$ sudo apt-get install wine/mepis85cr
The /mepis85cr next to apt-get install will choose the packages from Mepis instead of Debian.

Enjoy your updated wine version!

Thursday, May 15, 2014

Step by step VPS

1. reinstall deb 6.0 minimal
2. download
wget --no-check-certificate https://github.com/lowendbox/lowendscript/raw/master/setup-debian.sh
...bash setup-debian.sh system
...
bash setup-debian.sh exim4
...
wget http://nginx.org/keys/nginx_signing.key
...
apt-key add nginx_signing.key
...
apt-get install mc
...
vi /etc/apt/sources.list
deb http://nginx.org/packages/debian/ squeeze nginx
deb-src http://nginx.org/packages/debian/ squeeze nginx

apt-get update
apt-get install nginx

vi /etc/nginx/nginx.conf
ganti user menjadi www-data bila perlu

mkdir -p /var/www/domain/html
mkdir -p /var/www/domain/logs

buat html

** install php
vi /etc/apt/sources.list
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

wget http://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg

apt-get update -y
apt-get upgrade -y

apt-get install -y php5-common php5-curl php5-suhosin php5-fpm php5-gd php5-mysql php-apc

* test
phpinfo();

apt-get install -y mysql-server
 ...
3.optimal mysql / otomatis di afei-debian.sh
# cat > /etc/mysql/conf.d/lowendbox.cnf
[mysqld]
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K
ignore_builtin_innodb
default_storage-engine=MyISAM
(tekan ^D)

# reboot

4.reset root password
stop mysql
# killall mysqld

#mysqld_safe --skip-grant-tables &
(enter 2x)

#mysql -u root mysql

mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';mysql> flush privileges;
mysql> quit

# killall mysqld
# /etc/init.d/mysql start

 ** gak bisa stop normal?
Try this:
  1. sudo cat /etc/mysql/debian.cnf and look for the password listed under both the [client]and [mysql_upgrade] sections
  2. mysql -u root -p password being the original MySQL root password
  3. GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '*the password obtained from step 1*';
  4. /etc/init.d/mysql restart
=============
next : littleutil => utk processing image
utk wordpress = cukup w3total cache = cache page,html minify no inline minify,object cache, browser opt
php apc = mungkin gak perlu bila SSD ?

---that's all

Friday, April 18, 2014

qemu repo centos6

http://download.opensuse.org/repositories/home:/billcavalieri:/QEMU/CentOS_CentOS-6/


Wednesday, March 26, 2014

Check RAID

check RAID for HP server:
#cat /proc/driver/cciss/cciss*

check Disk seen by OS:
# fdisk -l


Monday, March 10, 2014

Littleutils on debian

1.download
wget http://downloads.sourceforge.net/project/littleutils/littleutils-source/1.0.27/littleutils-1.0.27.tar.bz2
 
2.install dependencies
apt-get install make gifsicle pngcrush lzip libpng12-0 libpng12-dev libjpeg-progs p7zip-full
 
3.uncompresss dg mc

lalu:

./configure --prefix=/usr
make
make install
make install-extra
 
4.selesai 

Friday, February 7, 2014

From GUI to Text

Edit /etc/default/grub with your favorite editor,
sudo nano /etc/default/grub

Find out this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it to:
GRUB_CMDLINE_LINUX_DEFAULT="text"

Update Grub:
sudo update-grub
 
 

Thursday, February 6, 2014

Install desktop on ubuntu server 12.04

xfce4:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install ubuntu-desktop tightvncserver xfce4 xfce4-goodies
reboot

---------------

Tuesday, January 7, 2014

xfce4 vnc debian

install debian
install xfce4
install vnc4server

nano ~/.vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startxfce4 &

reboot

Monday, January 6, 2014

Tuesday, November 26, 2013

KVM Debian 7

debian 7,char,minimal,ssh only
apt-get update
apt-get upgrade
apt-get install lxde

nano /etc/inittab--remark getty
/etc/init.d/bluetooth stop
update-rc.d bluetooth remove

reboot

apt-get install -y zenity cabextract

apt-get install wine
wget http://winetricks.org/winetricks
chmod +x winetricks
./winetricks
[install mcf4?.dll/windows component]
= install all windows =






-----comment out
1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6

Wednesday, November 20, 2013

VPS DEBIAN 7

apt-get install nano -y

nano /etc/apt/sources.list

#Dotdeb repo
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
--------- 

wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg | apt-key add -

apt-get install -y nginx-full
/etc/init.d/nginx start
mkdir /var/www
chown www-data:www-data /var/www
nano /etc/nginx/nginx.conf
[...]
worker_processes  4;
[...]
    keepalive_timeout   2;
[...]
-----------
 
nano /etc/nginx/sites-available/default
[...]
   index index.php index.html index.htm; 
[...] 
 
apt-get install php5 php5-fpm php5-mysql php5-gd

nano /etc/php5/fpm/php.ini
[...]
; http://php.net/cgi.fix-pathinfo
cgi.fix_pathinfo=0 
[...]
 
apt-get install mysql-server-5.5

copy nginx.conf, afei.cnf

cat /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
password = n4aSHUP04s1J32X5
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
user     = debian-sys-maint
password = n4aSHUP04s1J32X5
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr
lihat[client]
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'n4aSHUP04s1J32X5';
/etc/init.d/mysql restart  


--------
apt-get install gcc make
apt-get install gifsicle pngcrush lzip libpng12-0 libpng12-dev libjpeg-progs p7zip-full

download littleutils-1.0.30.tar.bz2

    tar jxvf littleutils-1.0.30.tar.bz2
    cd littleutils-1.0.30
    ./configure
    make
    make install
    make install-extra






=====

Upgrade Debian 6 to 7

apt-get update -y && apt-get upgrade -y

echo "
deb http://mirrors.kernel.org/debian/ wheezy main
deb-src http://mirrors.kernel.org/debian/ wheezy main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

# wheezy-updates, previously known as 'volatile'
deb http://mirrors.kernel.org/debian/ wheezy-updates main
deb-src http://mirrors.kernel.org/debian/ wheezy-updates main
" > /etc/apt/sources.list

To update the package list, enter:
apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y

reboot

cat /etc/issue

backup:
tar zcpf /tmp/semua.tar.gz  --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=tmp .

restore:

tar zxpf /[folder]/semua.tar.gz  /




Tuesday, November 19, 2013

alternative dns low memory

named = high memory
using nsd

http://www.promovps.com/2011/11/tutorial-vps/low-resource-dns-name-server-using-nsd.html

VNC on DEBIAN 7

apt-get update -y && apt-get upgrade -y

apt-get install -y lxde xfonts-100dpi xfonts-100dpi-transcoded xfonts-75dpi xfonts-75dpi-transcoded xfonts-base

#Installing and Configuring vnc4server
apt-get install -y vnc4server nano

# Now we need to add a user
adduser vncuser

# lakukan ini
mkdir -p /etc/vncserver
echo "
VNCSERVERS=\"1:vncuser\"
VNCSERVERARGS[1]=\"-geometry 1024x768\"
" >  /etc/vncserver/vncservers.conf

# copy paste
touch /etc/init.d/vncserver
chmod +x /etc/init.d/vncserver
nano /etc/init.d/vncserver

# Contents of /etc/init.d/vncserver

#!/bin/bash
### BEGIN INIT INFO
# Provides:          vncserver
# Required-Start:    $syslog
# Required-Stop:     $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: vnc server
# Description:
#
### END INIT INFO

unset VNCSERVERARGS
VNCSERVERS=""
[ -f /etc/vncserver/vncservers.conf ] && . /etc/vncserver/vncservers.conf
prog=$"VNC server"

start() {
 . /lib/lsb/init-functions
 REQ_USER=$2
 echo -n $"Starting $prog: "
 ulimit -S -c 0 >/dev/null 2>&1
 RETVAL=0
 for display in ${VNCSERVERS}
 do
 export USER="${display##*:}"
 if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
 echo -n "${display} "
 unset BASH_ENV ENV
 DISP="${display%%:*}"
 export VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"
 su ${USER} -c "cd ~${USER} && [ -f .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}"
 fi
 done
}

stop() {
 . /lib/lsb/init-functions
 REQ_USER=$2
 echo -n $"Shutting down VNCServer: "
 for display in ${VNCSERVERS}
 do
 export USER="${display##*:}"
 if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
 echo -n "${display} "
 unset BASH_ENV ENV
 export USER="${display##*:}"
 su ${USER} -c "vncserver -kill :${display%%:*}" >/dev/null 2>&1
 fi
 done
 echo -e "\n"
 echo "VNCServer Stopped"
}

case "$1" in
start)
start $@
;;
stop)
stop $@
;;
restart|reload)
stop $@
sleep 3
start $@
;;
condrestart)
if [ -f /var/lock/subsys/vncserver ]; then
stop $@
sleep 3
start $@
fi
;;
status)
status Xvnc
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac

# Register the service

update-rc.d vncserver defaults 99

# Now we must create a VNC connection password for our user. First we will use the su command to login to the user's shell and use the vncpasswd to set the password.

su vncuser
vncpasswd

# We need to start then stop the server to generate a configuration file

vncserver :1; vncserver -kill :1

# After we've generated the configuration file, we must edit it so that LXDE is loaded when we connect

nano ~/.vnc/xstartup

# Edit the file or replace its contents so that they look like the code below and save

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
lxsession -s LXDE &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &

# Drop back to root shell

exit

# Start the VNC service

service vncserver start

Connecting to your VNC server from your local PC

Monday, November 11, 2013

Top 20 Affiliate Marketing

        Network
        Survey comments or notes
        1
        Rakuten Linkshare
        linkshare.com
        Rakuten Linkshare
        A focus on big etail, smaller merchants and advertiser service has kept Rakuten LinkShare on top for another year.
        2
        Commission Junction
        cj.com
        Commission Junction
        CJ is professional, consistent and trusted. A very close competition between CJ and Linkshare this year.
        3
        Amazon
        affiliate-program.amazon.com
        Amazon
        Amazon offers a lowish percentage per sale but their ease of use and massively broad product offering makes them very popular
        4
        ClickBank
        clickbank.com
        clickbank
        Everybody’s favorite way to get into selling their own digital product, ClickBank continues to attract a lot of small merchant support.
        5
        ShareASale
        shareasale.com
        shareasale
        Generates a lot of loyalty and trust from publishers and advertisers. A network that is perceived as doing things the way they should be done.
        6
        AvantLink
        avantlink.com
        avantlink
        A very professional network that gained ground in this year’s survey. AvantLink is doing a lot right.
        7
        Google Affiliate Network
        google.com
        google
        The Google Affiliate Network inevitably benefits from the vast scale of Google’s portfolio. A huge network.
        8
        RevenueWire
        revenuewire.com
        revenuewire
        A network specializing in digital products, built on elevated principles of sustainable and ethical commerce.
        9
        oneNetwork Direct
        onenetworkdirect.com
        onenetworkdirect
        Digital River’s oneNetworkDirect is the leader in software sales with the industry’s best network technology and offices worldwide.
        10
        Pepperjam
        pepperjamnetwork.com
        pepperjamnetwork
        Renowned as a network helpful to newbies, Pepperjam also has a loyal following of super-affiliates and merchants.
        11
        LinkConnector
        linkconnector.com
        linkconnector
        An established network offering many trusted merchant brands ranging from Internet Top 500 Retailers to smaller niches.
        12
        Affiliate Window
        us.affiliatewindow.com
        affiliatewindow
        Winners of Best CPS Network at the 2012 Affiliate Marketing Awards, they are the biggest affiliate network in Britain, and now making a splash in the U.S.
        13
        eBay Partner Network
        ebaypartnernetwork.com
        ebaypartnernetwork
        eBay’s affiliate network with the Quality Click Pricing (QCP) payout system.
        14
        Avangate
        avangate.com
        avangate
        Another award winning network out of Europe with an emphasis on software and SaaS
        15
        TradeDoubler
        tradedoubler.com
        Founded in Sweden in 1999, it pioneered affiliate marketing in Europe and remains the most successful pan-European performance marketing company.

        16
        zanox
        zanox.com
        zanox
        Europe’s biggest affiliate network.

        17
        Millionaire Network
        millionairenetwork.com
        millionairenetwork
        Millionaire Network is an invitation-only affiliate network completely dedicated to advertiser success.
        18
        PeerFly
        peerfly.com
        peerfly
        Came from nowhere two years ago and zoomed in popularity this year. Great staff and an excellent platform.
        19
        WebGains
        webgains.com
        webgains
        Strong contender out of the UK, with some excellent core values that should keep them around for a long time.
        20
        AdCommunal
        adcommunal.net
        adcommunal
        The best affiliate network in the AdCanadian internet marketing industry today

Tuesday, November 5, 2013

VPS 64Mb Debian 6

root@trial269-deb:~# free
             total       used       free     shared    buffers     cached
Mem:         62092      59828       2264          0      12460      33004
-/+ buffers/cache:      14364      47728
Swap:       131064          0     131064
root@trial269-deb:~#


Tuesday, October 29, 2013

Remove unused function javascript

Cek this :
http://code.google.com/p/closure-compiler/

Thursday, September 26, 2013

gzip all files in subfolder

find . -name '*.txt' | while read file; do gzip -9 -c "$file" > "$file.gz"; done

find . -name '*.js' | while read file; do gzip -9 -c "$file" > "$file.gz"; done


find . -name '*.css' | while read file; do gzip -9 -c "$file" > "$file.gz"; done

Tuesday, September 3, 2013

Lighttpd setup

1.multi domain
===========
$HTTP["host"] =~ "(^|\.)domain\.com$" {
   url.rewrite-once = (
      # Exclude additional specific directories from rewrites
      "^/(files)/?(.*)" => "$0",
      "^/(mysql)/?(.*)" => "$0",

      "^/(wp-.+).*/?" => "$0",
      "^/(favicon.ico)" => "$0",
      "^/(sitemap.xml)" => "$0",
      "^/(xmlrpc.php)" => "$0",
      "^/(.+)/?$" => "index.php/$1"
   )
}