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
$onAfterShowForm = <<< ONAFTERSHOWFORM | |
function(){ | |
f = $(this).attr('id'); | |
var parpar = $('.selected_tab_parent').attr('rel'); | |
var setts = $('#totalcols_'+parpar+'_parentx').attr('setts').split('-/-'); | |
if ( $('#totalcols_'+parpar+'_parentx').attr('class') == 'col3' ){ | |
$('.ui-jqdialog').css( "width", setts[0]); | |
} | |
if ( $('#totalcols_'+parpar+'_parentx').attr('class') == 'col2' ){ |
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
<html> | |
<head> | |
<title>Kresimir Pendic</title> | |
<meta name="description" content="Kresimir Pendic some projects :)"/> | |
<meta name="author" content="Kresimir Pendic"/> | |
<link rel="stylesheet" href="https://rawgit.com/icebreaker/proudify/master/proudify.min.css" type="text/css"/> | |
<link rel="stylesheet" href="http://proudify.me/main.css" type="text/css"/> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Sans+Mono|Yanone+Kaffeesatz:extralight,light,regular,bold" type="text/css" media="screen, projection"/> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<script src="https://rawgit.com/icebreaker/proudify/master/jquery-proudify.js"></script> |
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 | |
header('Content-Type: text/html; charset=utf-8'); | |
/** | |
* [helper fn for en/de (crypt) strings] | |
* @var string | |
*/ | |
$mod = ( isset( $_GET['mod'] ) ? $_GET['mod'] : '' ); | |
$val = ( isset( $_GET['val'] ) ? $_GET['val'] : '' ); |
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 | |
remove_shortcode('gallery'); | |
add_shortcode('gallery', 'custom_size_gallery'); | |
function custom_size_gallery($attr) { | |
$attr['size'] = 'home-small-image'; | |
return gallery_shortcode($attr); | |
} |
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
$.ajax({ | |
url: 'http://thepiratebay.se/search/Bad%20Neighbors', | |
dataType: 'text', | |
headers: { 'Access-Control-Allow-Origin': true }, | |
async:false, | |
success: function(data){ | |
console.log('super') | |
}, | |
complete: function(data){ | |
console.log('gotov sam, ' ); |
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
// ################################### | |
// js object magic getters and setters | |
// name = new obj; name.prop1 = 'data1'; name.prop1; //returns 'data1' .. | |
// ################################### | |
function obj(properties) { | |
for (var i in properties) { | |
(function(i) { | |
Object.defineProperty(self, i, { | |
get: 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
##################################### | |
windows cmd : set dns address manualy | |
##################################### | |
netsh interface ip set dns "LAN" static 192.168.2.4 | |
netsh interface ip add dns name="LAN" addr=8.8.4.4 index=1 | |
netsh interface ip add dns name="LAN" addr=8.8.8.8 index=2 |
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 log( change ) { | |
// Note that |change.object| is actually a reference to the | |
// target object. | |
if ( change.type === "read" ) { | |
console.log( "What was accessed? ", change.name ); | |
console.log( "What value was given? ", change.oldValue ); | |
} | |
else { |
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 data = { | |
"description": "the description for this gist", | |
"public": true, | |
"files": { | |
"file1.txt": { | |
"content": "String file contents" | |
} | |
} | |
}; |