This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function html5_canvas() { | |
// declear variables | |
var $canvas, $rect, $circle, $triangle, $i, $limit, $width, $height; | |
//create canvas object with div id | |
$canvas = new fabric.Canvas('canvas_1'); | |
// create Circle - note radius |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$('a.class').popover({'title':'Title', 'content':$('#content').html(), 'html':true, 'placement':'bottom'}); | |
$('a.class').live('click', function(){ | |
$('a.class').not(this).popover('hide'); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function validGeorgianDate($attribute, $params) | |
{ | |
$parts = explode('/', $this->$attribute); | |
if(count($parts) == 3) | |
if(is_numeric($parts[0]) && is_numeric($parts[1]) && is_numeric($parts[2])) | |
if (checkdate($parts[0], $parts[1], $parts[2])) | |
return; | |
$this->addError($attribute, "Value is nod valid date."); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install -y ppa-purge | |
add-apt-repository -y ppa:ondrej/php5-oldstable | |
apt-get update | |
ppa-purge ppa:ondrej/php5 | |
apt-get update && apt-get upgrade -y && apt-get autoremove -y && apt-get autoclean -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-add-repository ppa:glasen/intel-driver | |
sudo apt-get update | |
sudo apt-get install xserver-xorg-video-intel | |
#If you use Ubuntu 12.04, then you can enable the 'SNA' feature (disabled by default) of Intel Sandy Bridge architecture which improves #both 2D and 3D performance. For that, enter the below command in your Terminal window to open the text editor with administrative #privileges. (/etc/X11/xorg.conf) | |
Section "Device" | |
Identifier "Card0″ | |
Driver "intel" | |
Option "AccelMethod" "sna" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
wait | |
apt-get update | |
wait | |
apt-get upgrade | |
wait | |
apt-get install php5 php5-xdebug php5-xmlrpc php5-odbc php5-mysql php5-memcache php5-memcached php5-mcrypt php5-intl php5-imap php5-imagick php5-gd php5-curl php5-cli php-pear php-codesniffer | |
wait |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo update-alternatives --config javac | |
sudo update-alternatives --config java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!Date.prototype.toLocaleFormat){ | |
Date.prototype.toLocaleFormat = function(format) { | |
var f = { | |
Y : this.getFullYear(), | |
y : this.getFullYear()-(this.getFullYear()>=2e3?2e3:1900), | |
m : this.getMonth() + 1, | |
d : this.getDate(), | |
H : this.getHours(), | |
M : this.getMinutes(), | |
S : this.getSeconds() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getUrlVars() | |
{ | |
var vars = {}, hash; | |
var hashes = window.location.toString().slice(window.location.href.indexOf('?') + 1).split('&'); | |
for(var i = 0; i < hashes.length; i++) | |
{ | |
hash = hashes[i].split('='); | |
vars[hash[0]] = hash[1]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsettings set org.pantheon.desktop.gala.keybindings switch-input-source "['<Alt>Shift_L', '<Alt>Shift_R', '<Shift>Alt_L', '<Shift>Alt_R']" |
OlderNewer