2018/08/29

PHP to UML

I wanted a tool to convert PHP classes to UML, but I also wanted to be able to modify the result.

As a (maybe positive) side effect I had to separate all PHP classes in a particular directory in order to avoid the tool to get confused with other scripts used to generate Javascript code among other things.


(this post may require some revisions)

grab php2xmi from

http://tech.motion-twin.com/php_php2xmi.html

sample script to run on project directory:


php2xmi \
--no-private \
--no-protected \
--output=/home/rudy/borrame/myresult.xmi \
`find src/class -name "*.php"`

add --path= if you need to include other project files

once you get the XMI file, you can import it with ArgoUML

http://argouml-downloads.tigris.org/argouml-0.34/

it wont generate the UML on the fly


2018/08/05

Stylish for TW (updated)

When I do things like this I want to separate updated content from what is not.

This template removes pinned tweets among other things like the Moments, prompts, translate buttons and recommended followers.


@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("twitter.com") {
#above-timeline-prompt,
.user-pinned,
.SidebarCommonModules,
.moments,
.message,
.translate-button, .GalleryNav,
.js-recommended-followers
{ display:none !important }

}


2018/08/02

network bonding on slackware 14.2

perhaps a first sloppy attempt I made to make bonding work in 14.2, based on this info

https://docs.slackware.com/howtos:misc:network_interace_bonding

inside /etc/rc.d/rc.M add (before rc.local section):

if [ -x /etc/rc.d/rc.bond ]; then
  . /etc/rc.d/rc.bond
fi



/etc/rc.d/rc.bond :
modprobe bonding

ip addr add 192.168.111.3/24 dev bond0
ip link set bond0 up


ip link set eth0 master bond0
ip link set eth1 master bond0

ifconfig eth0 up
ifconfig eth1 up

ip route add default via 192.168.111.13 dev bond0
chmod +x rc.bond and reboot