Skip to content

Instantly share code, notes, and snippets.

@andrijac
andrijac / gist:1296731
Created October 18, 2011 21:08 — forked from dshaw/gist:378192
(function(window,document,undefined){ ... })(this,this.document);
// everyone's new favorite closure pattern:
(function(window,document,undefined){ ... })(this,this.document);
// when minified:
(function(w,d,u){ ... })(this,this.document);
// which means all uses of window/document/undefined inside the closure
// will be single-lettered, so big gains in minification.
// it also will speed up scope chain traversal a tiny tiny little bit.
@andrijac
andrijac / LICENSE.txt
Created May 16, 2012 12:00 — forked from atk/LICENSE.txt
polyfill an ES5-compatible Array.prototype.indexOf
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alex Kloss <alexthkloss@web.de>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@andrijac
andrijac / select.js
Created August 13, 2012 12:51
select element in jquery, reading values
// selected index in select (dropdown)
$.fn.selectedIndex = function () {
var index = 0;
this.each(function () {
index = +$(this).prop('selectedIndex');
return false;
});
return index;
};
@andrijac
andrijac / createProperty.js
Created August 17, 2012 08:00
create property in javascript, cross browser, createProperty function
function createProperty(config) {
var options = { initValue: null, setter: null, getter: null },
_config = $.extend(options, config),
_value = _config.initValue,
context;
return function (value) {
if (value === undefined) {
if (_config.getter && typeof _config.getter === "function") {
context = { value: _value };
return config.getter(context);
@andrijac
andrijac / test_template.html
Created August 29, 2012 23:27
JS Test template
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/qunit/qunit-git.css" />
<title></title>
</head>
<body>
<div id="qunit"></div>
<!---------- scripts ----------------->
@mjhea0
mjhea0 / horizontal.html
Created October 25, 2013 14:05
HORIZONTAL infinite scroll
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Infininity ...</title>
</head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script>
@andrijac
andrijac / install.sh
Last active December 28, 2015 09:49
Linux Mint 15 Cinnamon 32bit setup
sudo apt-get update
#sudo apt-get upgrade
sudo apt-get install -y skype
sudo apt-get install -y vlc
sudo apt-get install -y adobe-flashplugin
sudo apt-get install -y gnome-commander
sudo apt-get install -y filezilla
#google repository
osql -U sa -P password -S .\SQL2012 -d database -n-1 -i "C:\dbo.Huge_Tariff_Table.sql" -o C:\tem
p\output.txt
@airportyh
airportyh / jsconf_slides_codes_and_notes.md
Last active June 19, 2017 20:51
JSConf 2014 Slides, Codes and Notes.

JSConf Slides, Codes and Notes

These are all the JSConf 2014 slides, codes, and notes I was able to cull together from twitter. Thanks to the speakers who posted them and thanks to @chantastic for posting his wonderful notes.

Modular frontend with NPM - Jake Verbaten (@Raynos)

@andrijac
andrijac / gist:3b5c04d29db3fd12e0ee576324f09741
Created January 9, 2018 10:13 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: