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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Marker</title> | |
<meta name="author" content="Arturs Jansons"> | |
<!-- Date: 2010-10-16 --> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> | |
<script> | |
$(function(){ |
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
<script>window.ready=function(){var e;e=!1;return function(d){var a,c;c=function(){if(!e)return e=!0,d()};a=function(){try{document.documentElement.doScroll("left")}catch(b){return setTimeout(a,1),null}return c()};if(document.readyState==="complete")return c();if(document.addEventListener)return document.addEventListener("DOMContentLoaded",c,!1),window.addEventListener("load",c,!1);else if(document.attachEvent&&(document.attachEvent("onreadystatechange",c),window.attachEvent("onload",c),(typeof document=== | |
"undefined"||document===null?0:document.documentElement==null?0:document.documentElement.doScroll)&&(typeof window==="undefined"||window===null?void 0:window.frameElement)===null))return a()}}(); | |
ready(function(){function e(c,b){for(x in a)if(x>c-x%9&&a[x]==b||a[x%9]==b||a[x%9+9]==b||a[x%9+18]==b||a[x%27-x%3+1]==b||a[x%27-x%3+2]==b||a[x%27-x%3+3]==b||a[x%27-x%3+10]==b||a[x%27-x%3+11]==b||a[x%27-x%3+12]==b||a[x%27-x%3+19]==b||a[x%27-x%3+20]==b||a[x%27-x%3+21]==b)b=0;a+=""+b}var d,a="";for(d=1;d<=81;d++)e(d,M |
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 | |
# Alter selected table by differance between shemas | |
shema1=$1 | |
shema2=$2 | |
echo "" > sql/$shema1"-alter.sql" | |
for table in $(echo "show tables" | mysql -uroot $shema1 | tail -n +2 ) | |
do | |
diff sql/$shema1/$table"-create.sql" sql/$shema2/$table"-create.sql" | grep -e '^> \W' | sed 's/^>/ALTER TABLE `'$table'` ADD /g;s/\s*,$/;/g' > sql/$shema1/$table"-alter-add.sql" | |
cat sql/$shema1/$table"-alter-add.sql" >> sql/$shema1"-alter.sql" |
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/sh | |
# Creates new CodeIgniter project | |
if [ $1 ]; then | |
mkdir -p ./$1 | |
ln -s ~/public_html/codeigniter/system/ ./$1/system | |
cp -r ~/public_html/codeigniter/app/ ./$1/app | |
cp ~/public_html/codeigniter/index.php ./$1 | |
sed 's/RewriteBase \/~.*/RewriteBase \/~'`whoami`'\/'$1'/' ~/public_html/codeigniter/.htaccess > ./$1/.htaccess | |
sed 's/.base_url.*/"base_url"] = "http:\/\/'`hostname`'\/~'`whoami`'\/'$1'\/";/' ./codeigniter/app/config/config.php > ./$1/app/config/config.php | |
echo "You can see Your page on \"http://`hostname`/~`whoami`/$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
## Symfony2 | |
## Clear Cache | |
rm -rf app/cache/* | |
rm -rf app/logs/* |
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
<?php | |
function error($e) | |
{ | |
switch($e['type']) | |
{ | |
case E_ERROR: // 1 // | |
return '<div class="alert alert-error"><a class="close" data-dismiss="alert" href="#">×</a><p><i class="icon-code icon-cog"></i>'.$e['message'].' on line '.$e['line'].'</p></div>'; | |
case E_WARNING: // 2 // | |
return '<div class="alert alert-warning"><a class="close" data-dismiss="alert" href="#">×</a><p><i class="icon-code icon-cog"></i>'.$e['message'].' on line '.$e['line'].'</p></div>'; | |
case E_PARSE: // 4 // |
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
<?=(@$days=intval((time()-strtotime("15.10.2011"))/86400))?"Pirms ".$days.((substr($days,-1)==1&&substr($days,-2)!=11)?" dienas":" dienām"):"Šodien";?> | |
<?=(@$days=intval((time()-strtotime("15.10.2011"))/86400))?$days.((substr($days,-1)&&substr($days,-1)>4)?" дней":(substr($days,-1)==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
// shim for String.prototype.normalize https://github.com/walling/unorm | |
export default str => str.normalize('NFKD') | |
.replace(/[\u0300-\u036f]/g, "") // remove accents | |
.replace(/\u0142/g, "l"); // ł is a letter in itself | |
/* | |
const normalize = import('normalize.js') | |
console.log(normalize('ąśćńżółźćęāēūīšģķļ')) | |
*/ |
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 | |
## Originally written by aysiu from the Ubuntu Forums | |
## This is GPL'ed code | |
## So improve it and re-release it | |
## Define portion to make Thunar the default if that appears to be the appropriate action | |
makethunardefault() | |
{ | |
## I went with --no-install-recommends because |
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
var d=document, | |
w={ | |
'window':0,'d':0,'d.forms':0, | |
'form':1,'input':1,'table':1,'a':1, | |
'/./':0,'!1':0,'0xf0':0,'070':0,'0.90':0,'""':0,"''":0,'Array()':0,'Math':0 | |
} | |
for(k in w){ | |
if(w[k]) | |
k = d.createElement(k); | |
v=eval(k); |
OlderNewer