Skip to content

Instantly share code, notes, and snippets.

View icetee's full-sized avatar
:atom:
Development

Tamás András Horváth icetee

:atom:
Development
View GitHub Profile
// ==UserScript==
// @name Steam Price Comparison - Unpowered edition
// @version 2.3.3
// @namespace http://steamunpowered.eu/comparison-script/
// @description Displays prices from all regions in the Steam store and convert them to your local currency
// @copyright 2011+, KindDragon; 2010+, Zuko; Original author: Tor (http://code.google.com/p/steam-prices/)
// @homepage http://userscripts.org/scripts/show/149928
// @download http://userscripts.org/scripts/source/149928.user.js
// @update http://userscripts.org/scripts/source/149928.meta.js
// @license MIT License; http://www.opensource.org/licenses/mit-license.php
@icetee
icetee / placeholder-fix.js
Last active August 29, 2015 14:12
HTML5 Placeholder disappear fix on focus
$('input:text, textarea').each(function(){
var $this = $(this);
$this.data('placeholder', $this.attr('placeholder'))
.focus(function(){$this.removeAttr('placeholder');})
.blur(function(){$this.attr('placeholder', $this.data('placeholder'));});
});
@icetee
icetee / helyiertek.php
Created January 1, 2015 19:39
Helyiérték
function addPlaceValue(nStr)
{
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + '.' + '$2');
}
@icetee
icetee / numeral-hu.js
Last active August 29, 2015 14:12
Numeral Hungarian language
/*!
* numeral.js language configuration
* language : Hungarian (hu)
* source : Peter Bakondy : https://github.com/pbakondy
* author : Horváth Tamás András
*/
(function () {
var language = {
delimiters: {
thousands: '.',
@icetee
icetee / bootstrap-modal-fix
Created January 7, 2015 16:13
Bootstrap modal - scroolbar fix
body.modal-open, .modal-open .modal-open {
margin-right: -15px;
}
@icetee
icetee / keydownnext
Created January 24, 2015 15:10
Keydown next
$('.inputs').keydown(function (e) {
if (e.which === 13) {
var index = $('.inputs').index(this) + 1;
$('.inputs').eq(index).focus();
}
});
@icetee
icetee / pll_post_types
Last active November 28, 2018 00:35
WordPress Polylang Add Custom Types
add_filter('pll_get_post_types', 'my_pll_get_post_types');
function my_pll_get_post_types($types) {
return array_merge($types, array('portfolio' => 'portfolio'));
}
@icetee
icetee / keymap.cson
Last active December 7, 2017 00:33
icetee-atom-keymap
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
# Here's an example taken from Atom's built-in keymap:
@icetee
icetee / icetee.csscomb.json
Last active March 16, 2016 22:25
CSScomb config
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"eof-newline": true,
"leading-zero": true,
"quotes": "double",
@icetee
icetee / acf-google-map.js
Last active August 29, 2015 14:22
acf-google-map.js added "set zoom" feature
(function ($) {
function render_map($el) {
var $markers = $el.find('.marker');
// Add custom data-zoom
window.gmapzoom = parseInt($markers.attr('data-zoom'));
if ( isNaN(window.gmapzoom) ) { window.gmapzoom = 16; }