Wednesday, July 01, 2015

scribefire and blogspot


I use scribefire for a roller blog and this and I have to use different client.

Tuesday, June 30, 2015

three python libraries

http://blog.instavest.com/three-useful-python-libraries-for-startups

Tuesday, April 08, 2014

git, I hate it now

I am in a small size team(10), we switched from SVN to git+gerrit , after a while I really hate to use this setup.

  1. not very intuitive from the SVN camp, you need more than an hour to get everything  set up.
  2. need to learn new ways to do old subversion jobs, not straight forward,
  3. upon frustration of pulling with conflict, reset and rebase will erase your work, and it is gone forever, you have to redo the code.
  4. even after you  replace with head revision for the files, they still shows up in the unstaged changes.
  5. generate and reuse header if too complicated.
  6. I am sure I can spend a  day to concentrate on it , I will get everything right, but I did not spend more than one hour in SVN, and I had never have to redo the coding.
  7. I sense half of the team think it is unnecessarily complicated.

Sunday, January 19, 2014

Walk on a trail

an hour walk on the trail 140, 341, 342, really nice weather.

Gerrit+LDAP

setup gerrit with LDAP authentication.

Here are the key note for gerrit.conf file
[auth]
        type = LDAP
[ldap]
        server=
        accountBase= ou=people,dc=*,dc=*
        accountPattern=(&(objectClass=person)(uid=${username}))
        accountFullName= mail
        accountEmailAddress = mail
[httpd]
        listenUrl=http://*:8180/

 also tried apache2 proxy to LDAP. key note
created a new virtual host with port 8082, have to add this to the port.conf
the gerrit port is still 8180.
in gerrit.conf
canonicalWebUrl = http://192.168.1.30:8082/
[httpd]
        listenUrl = proxy-http://127.0.0.1:8180/
the LDAP way is easier to config, the proxy one is working halfway, can only login first user and creat admin. I don't have time to figure out why
 another lessons learned here for gerrit username.
User names cannot contain spaces.  Currently they are restricted to be
strings that match the following regular expression:
  ^[a-zA-Z][a-zA-Z0-9._-]*[a-zA-Z0-9]$

otherwise, gerrit login will give "name does not conform" error.

Saturday, January 18, 2014

Apache+openldap without SSL

This is a experimental in my home network without using ssl.

sudo a2enmod ldap authnz_ldap authn_alias
the red part is appended.  
sudo emacs sites-available/default
        AuthLDAPURL ldap://localhost:389/dc=****,dc=****?uid?sub?(objectClass=*)

        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/
       
                Options FollowSymLinks
                AllowOverride None
       
       
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all

                AuthName  "Authentication"
                AuthBasicProvider ldap-internal
                AuthType Basic
                AuthzLDAPAuthoritative on
                Require valid-user
       
that's it, access apache with LDAP.

Scribefire not working now

I have been using scribefire to publish blogs for 5 years, and recently ( since my last post), it stopped working with this site. I am too busy to figure out why and I saw other people's comments on the apps comments section complaining for the same thing.I have a home blog using apache roller, so scribefire will allow me to publish to both site. if some one figured out the cause, I would like to use scribefire again.

Tuesday, December 31, 2013

setup openwrt on Asus rt-n15 as wireless client with relayed(Pseudo-bridge)

openwrt on asus rt-n15(Attitude Adjustment 12.09|Load:0.26 0.08 0.06)
  • rt-n15
Flash from a Windows PC using the Firmware Restoration utility. (Download and install the Firmware Restoration Utility to your PC.)
The Asus RT-N15 has a failover mode, (refer to rt-n16)http://wiki.openwrt.org/toh/asus/rt-n16
To launch the recovery mode disconnect power from the router first.
Hold the WPS button while replugged the power to the router to reset nvram, router will restart 2x. Hold the RESET button while replugged the power to the router to get into recovery mode : tftpd is listening. The power LED should start to blink (low frequency, ~1 time every 3 seconds). Retry if that won't work for you.
The router IP in the recovery mode is 192.168.1.1 255.255.255.0.
Configure your PC (don't use 192.168.1.1)
netsh interface ip set address name="Local Area Connection" static 192.168.1.2 255.255.255.0
Ping 192.168.1.1 should give a response.
Launch the Firmware Restoration utility, select the firmware and press the Upload button.
Ignore the warning, we wanna be on OpenWRT!
telnet to 192.168.1.1 and login as root, there is no password, type in passwd to set a password for root.
login in to web interface and assign a DNS server to the Lan interface.
close telnet and use ssh to login 192.168.1.1
login in to web interface and assign a DNS server to the lan interface.

root@OpenWrt:~# opkg update
root@OpenWrt:~# opkg install relayd
root@OpenWrt:~# opkg install luci-proto-relay

root@OpenWrt:~# /etc/init.d/relayd enable

  • use luci to config routed client relayed.
Basically.
  1.  enable 802.11 bgn(radio0) and scan wireless network.
  2. join the wireless network and it will ask for passcode, name of the new network(wwan by default) and create/assign firewall zone(select "lan" here)
  3. create a new network interface (" "stabridge"), select relayed bridge and select connect lan and wwan.
  4. network firewall under zones, change the forwarding for and lan and wwan to "accept"
 

openwrt on tp-link wdr4300

the openwrt was installed and configured as routed client relayed, and I need to reset the openwrt to factory default to use it as a WAP, here are the steps

  1. Power the router up;
  2. After powering up track the SYS light when it starts to blink, when it does press and hold the WPS/reset button till SYS lights starts to blink faster – router goes to recovery mode;
  3. Telnet to the router on 192.168.1.1 – no password needed (if your computer doesn’t gets IP address from DHCP assign it manually for i.e. 192.168.1.200 with netmask of 255.255.255.0);
  4. In telnet terminal type `mtd -r erase rootfs_data` to reset OpenWRT to it’s defaults. then the router will reboot.
  5. after reboot, telnet in and passwd to set a password.
  6. use PUTTY to ssh to 192.168.1.1 with username root and the password.

Monday, October 14, 2013

Installation of 389 Directory Server on Ubuntu server 12.04.3 LTS

  • sudo apt-get install python-software-properties
  • sudo add-apt-repository ppa:ubuntu-389-directory-server/ppa
  • sudo apt-get update
  • sudo apt-get install 389-admin 389-ds-base 389-ds-console

then

  •  sudo /usr/sbin/setup-ds-admin