#git

Git tricks

Backup an entire repository to one file using git bundle: git bundle create BACKUPFILE.git --all --tags --remotes Backup an entire local repository (with cache etc.) using rsync rsync -hxPavilyzH --stats --delete .git/ USER@HOST:/PATH/TO/BACKUP.git/ Automatically clean the repository of unneccesary files using git gc > du -chs .git 17M .git 17M total > git gc Counting objects: 12937, done. Compressing objects: 100% (7859/7859), done. Writing objects: 100% (12937/12937), done. ...

#administration #mysql

MySQL manage users

1. Removing users from the database. DROP USER 'USERNAME'@'HOSTNAME'; 2. Creating users – 3 common ways: A) The default way: CREATE USER 'USERNAME'@'HOSTNAME' IDENTIFIED BY 'USERPASSWORD'; B) As an insert statements: INSERT INTO `mysql`.`user` (Host,User,Password) VALUES('localhost','dummy',''); FLUSH PRIVILEGES; #it is neccessary, when creating users this way C) Batch adding users. Create a file (useradd.sql for example) which contains all create users statements : CREATE USER 'USERNAME'@'HOSTNAME' IDENTIFIED BY 'USERPASSWORD'; GRANT SELECT ON `DATABASE`. ...

#daemon #linux

ntpd – don’t run late…

NTPD is a daemon that is using the NTP (Network Time Protocol) to synchronize you local watch with servers. NTPD is not changing the time after the synchronization. It calculates the difference (offset) between remote timer and the local one and after that adjusts the timer several times to minimize the offset. Install ntpd on Gentoo/Sabayon emerge ntp vim /etc/ntp.conf #change servers used for sync vim /etc/conf.d/ntpd #set daemon options /etc/init. ...

CentOs shortcuts trick and more…

Synchronize time and date service ntpd stop ntpdate us.pool.ntp.org hwclock –systohc mv /etc/localtime /etc/localtime.bak ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime service ntpd start Configure network on CentOS Go and edit /etc/sysconfig/network-scripts/ifcfg-IFACENAME. You can check Yours iface name by ifconfig -a. Example configuration for static IP address: DEVICE=eth0 HWADDR=52:54:00:0D:00:01 TYPE=Ethernet UUID=be1cbf14-ff67-4b8b-aab9-xxxxxxxxx ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=static IPADDR=192.168.X.Y NETMASK=255.255.255.0 GATEWAY=192.168.X.Y Update Yum & install some tools yum update yum upgrade yum install vim top nettop iotop screen yum-utils svn git Save and restore iptables state #save iptables-save /root/working. ...

#cookie #joomla #php

Joomla 2.5.* – Can’t Login to backend

If you can’t login to Administration Panel of a Joomla 2.5.* site, try setting above in You configuration.php : public $cookie_domain = ''; public $cookie_path = ''; Quick fix for the directories permissions: chmod 755 administrator language/overrides language/en-GB libraries cache administrator/cache modules media plugins templates tmp logs images components administrator administrator/language/en-GB administrator/language/overrides administrator/manifests/files administrator/components administrator/language administrator/manifests/packages administrator/manifests/libraries administrator/modules administrator/templates

#css #html #php #Sublime Text 3

Sublime Text 3 – CheatSheet & Plugins for Web develpment.

First point of the program is installing the Sublime Text Editory itself. If you are using Sabayon or Gentoo, the is an overlay sublime-text, so You can emerge it. Installing Sublime Text 3 on Gentoo / Sabayon layman -a sublime-text layman -S emerge --regen emerge -av app-editors/sublime-text Installing helpfull plugins for Sublime Text 3 First of all install “Package Control” an utility that would make the plugin install proces simplier. ...

Blankstrap

Blankstrap Theme for Coppermine Gallery v0.2 Repository: bitbucket.org/pawelkoston/blankstrap-coppermine-theme Description Simple Coppermine theme build based on Twitters Bootstrap. It can be easly themed using a custom bootstrap theme. You can download themes from bootswatch or create Your own here Coppermine forum Demo See demo Download Zip or git clone https://bitbucket.org/pawelkoston/blankstrap-coppermine-theme.git blankstrap Known Issues The admin inrtface is still based on <table>’s and it needs some improvemnts You still get old jQuery 1. ...