Assuming php5-mysqlnd is already installed.
apt-get download phpmyadmin| <?php | |
| $DBHOST="host"; | |
| $DBUSER="user"; | |
| $DBPASSWD="pass"; | |
| $DATABASE="db"; | |
| $filename = "backup-" . date("d-m-Y") . ".sql.gz"; | |
| $mime = "application/x-gzip"; |
| sudo add-apt-repository ppa:tuxpoldo/phpmyadmin | |
| sudo apt-get update | |
| sudo apt-get install phpmyadmin |
| find . -name 'pattern' | xargs rm -f |
| pw user mod myname -G wheel |
| <?php | |
| //https://github.com/laravel/framework/issues/2093#issuecomment-39154456 | |
| use Illuminate\Database\Eloquent\Model as Eloquent; | |
| use Illuminate\Database\Eloquent\Relations\Pivot; | |
| class User extends Eloquent { | |
| public function groups() { | |
| return $this->belongsToMany('Group'); |
| #!/bin/bash | |
| # usage: save as 'videbcontrol.sh'; chmod 755 videbcontrol.sh; ./videbcontrol.sh foo.deb | |
| # | |
| # from: http://ubuntuforums.org/showthread.php?t=636724 | |
| if [[ -z "$1" ]]; then | |
| echo "Syntax: $0 debfile" | |
| exit 1 | |
| fi |
| #subdomain name | |
| echo -n "Name of your subdomain ?" | |
| read -e subdomain | |
| if [[ $subdomain != "" ]] | |
| then | |
| mkdir ~/$subdomain | |
| sudo touch /etc/apache2/sites-available/$subdomain | |
| sudo echo "<Virtualhost *:80>" >> /etc/apache2/sites-available/$subdomain | |
| sudo echo " ServerName $subdomain.username.kd.io" >> /etc/apache2/sites-available/$subdomain |
| try { | |
| if( new ActiveXObject('ShockwaveFlash.ShockwaveFlash') ) flash = true; | |
| }catch(e){ | |
| if(navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) flash = true; | |
| } |
| function _pop(url) { | |
| var e = {}; | |
| e.width = e.width || screen.width; | |
| e.height = e.height || screen.height; | |
| var t = "width=" + e.width + "px,height=" + e.height + "px,top=" + (screen.height - e.height) / 2 + ",left=" + (screen.width - e.width) / 2 + ",resizable=no,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no"; | |
| var n = window.open("about:blank", "_blank", t, false); | |
| n.document.location.href = url; | |
| } |