Assuming php5-mysqlnd is already installed.
apt-get download phpmyadmin
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Arp |
<?php | |
/** | |
* | |
* Thanks to Erickson Reyes ercbluemonday at yahoo dot com | so processes dont overlap | |
* ref : http://www.php.net/manual/en/function.getmypid.php#94531*/ | |
// Initialize variables | |
$found = 0; | |
$file = basename(__FILE__); | |
$commands = array(); |
#------------------Set tinker config for Boris (Laravel 4.1>=) | |
#Go to cli php.ini (php --ini) | |
#remove all disable_functions | |
#reload apache "servce apache2 reload" | |
#-----------------Install clockwork for debugging | |
# https://github.com/itsgoingd/clockwork | |
// helper | |
function set_active($path, $active = 'active') { | |
return call_user_func_array('Request::is', (array)$path) ? $active : ''; | |
} | |
// usage in view | |
<li class="{{ set_active(['admin/institutes*','admin/courses*']) }}"> |
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; | |
} |
try { | |
if( new ActiveXObject('ShockwaveFlash.ShockwaveFlash') ) flash = true; | |
}catch(e){ | |
if(navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) flash = true; | |
} |
#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 |
#!/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 |
<?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'); |