Skip to content

Instantly share code, notes, and snippets.

View mkdizajn's full-sized avatar
🐢
slow & thorough > faster & mistakable

Kresimir Pendic mkdizajn

🐢
slow & thorough > faster & mistakable
View GitHub Profile
@mkdizajn
mkdizajn / gist:8813861
Created February 4, 2014 22:40
jquery inspector pubnub add script to page dinamicly
(function(d,s){s=d.createElement('script');s.src='//cdn.pubnub.com/pubnub.min.js';(d.head||d.documentElement).appendChild(s)})(document);
@mkdizajn
mkdizajn / Preferences.sublime-settings
Created February 9, 2014 22:58
sublime my user preferences
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"detect_slow_plugins": false,
"font_face": "Inconsolata",
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Nettuts+ Fetch",
@mkdizajn
mkdizajn / FORM view, phpgrid, jqgrid.js
Last active August 29, 2015 14:00
after show form trigger for dropdown optional visibility of input fields in edit FORM view, phpgrid, jqgrid
$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' ){
@mkdizajn
mkdizajn / proudify my coderwall & github info.html
Last active August 29, 2015 14:02
proudify my coderwall & github info
<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>
@mkdizajn
mkdizajn / thepiratebay jquery load results ajax
Created July 13, 2014 07:26
thepiratebay jquery load results ajax
$.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, ' );
@mkdizajn
mkdizajn / javascript auto getters and setters.js
Last active August 29, 2015 14:04
javascript auto getters and setters
// ###################################
// 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() {
@mkdizajn
mkdizajn / windows cmd : set dns address manualy
Created July 24, 2014 07:20
windows cmd : set dns address manualy
#####################################
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
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 {
@mkdizajn
mkdizajn / gist:49bc4dbf9538690fd789
Created August 20, 2014 22:10
jquery anonymous gist publish
var data = {
"description": "the description for this gist",
"public": true,
"files": {
"file1.txt": {
"content": "String file contents"
}
}
};
# kopiranje out branch-a
git checkout -b < new_branch > < remote repo name >/< new_branch >