Skip to content

Instantly share code, notes, and snippets.

@otarza
otarza / calendar.php
Created November 19, 2014 20:15
Simple php calendar template using html table and 2 dimencional array
<?php
$calendar = array(
10 => array(
1 => array(),
2 => array(),
3 => array(
"start_time" => 10,
Name Status
Davit Bujiashvili Going
Dea Samniashvili Going
Tamar Gurtsishvili Going
Shota Jolbordi Going
Tsitsi Sadaghashvili Going
Giorgi Kharbedia Going
Giorgi Chkhaidze Going
გია ბუცხრიკიძე Going
Мито Чихладзе Going
@otarza
otarza / magic.js
Last active August 29, 2015 14:14
var magicCollection = [];
var interval;
jQuery(document).ready(function ($) {
console.log("Magic Media loaded");
var magicButtonInit = function () {
$('#photoborder').append("<a id='magicButton' href='#'> Cast the spell </a>");
$('#photoborder').append('<input type="text" id="folder" name="folder">');
$('#magicButton').click(function (e) {
interval = setInterval(function () {
var url = $('#fbPhotoImage').attr('src');
console.log("simulation loaded"); /*! jQuery Simulate [email protected] http://github.com/jquery/jquery-simulate | jquery.org/license */!function(a,b){function c(b){var c,d=a(b.ownerDocument);return b=a(b),c=b.offset(),{x:c.left+b.outerWidth()/2-d.scrollLeft(),y:c.top+b.outerHeight()/2-d.scrollTop()}}function d(b){var c,d=a(b.ownerDocument);return b=a(b),c=b.offset(),{x:c.left-d.scrollLeft(),y:c.top-d.scrollTop()}}var e=/^key/,f=/^(?:mouse|contextmenu)|click/;a.fn.simulate=function(b,c){return this.each(function(){new a.simulate(this,b,c)})},a.simulate=function(b,c,d){var e=a.camelCase("simulate-"+c);this.target=b,this.options=d,this[e]?this[e]():this.simulateEvent(b,c,d)},a.extend(a.simulate,{keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},buttonCode:{LEFT:0,MIDDLE:1,RIGHT:2}}),a.extend(a.simulate.protot
[
{
"full":"ბურღულეული და ფაფები",
"name":"",
"calories":"",
"FIELD4":null
},
{
"full":"წიწიბურა – 326",
"name":"წიწიბურა ",
@otarza
otarza / Vagrantfile.rb
Last active August 29, 2015 14:21
Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@otarza
otarza / install_drupal_env.sh
Created May 27, 2015 12:46
Drupal Environment
#!/usr/bin/env bash
# Use single quotes instead of double quotes to make it work with special-character passwords
PASSWORD='12345678'
PROJECTFOLDER='gdson'
# create project folder
sudo mkdir "/sites/${PROJECTFOLDER}"
# update / upgrade
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@otarza
otarza / exampla.php
Created June 3, 2015 14:34
Drupal Databases Example
<?php
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'name',
'username' => 'root',
'password' => '12345678',
'host' => 'localhost',
@otarza
otarza / prevent-scorll-on-iphone.js
Created June 5, 2015 12:50
prevent scrolling on iPhone
document.ontouchstart = function(e){
if() {
e.preventDefault();
} else {
return true;
}
}