Skip to content

Instantly share code, notes, and snippets.

Tamás Kádár KTamas

Block or report user

Report or block KTamas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@KTamas
KTamas / converter.php
Created Apr 13, 2013
Freeblog -> Wordpress the hackish way
View converter.php
<?php
ini_set('memory_limit', '256M');
ini_set('display_errors', 'on');
set_time_limit(0);
/**
* Filmbuzi.hu / pocok
*/
/**
View antibiotics.txt
Image: http://blog.ktamas.com/wp-content/uploads/2013/04/8731e218a1da11e2bb3e22000a1fb8a8_7.jpg
No effect:
throat infections caused by viruses
cold
bronchitis
Common cough
---
Doubtful or little effect:
View index.css
/* Removes Velvet, Totalcar, Porfolio, Divany, HG and some other unnecessary stuff. For the best experience, use it with adblock. */
/* based on http://keki.tumblr.com/post/15183352367/angeldaynak-szeretettel and userscripts.org/scripts/show/69639 */
#featured, #rss, #indabox, .adocean, #cikklistak, #szolg, .hirdetes, .cimlapozo-anyag .microsite_dummy, .hirdetes_bottom, .linkroll, #idojaras_top, #idojaras, #idojaras_bottom, #idojaras_bottom + .doboz_bottom, .partnerek, .partnerek + .box_bottom_light, #ctravelbox, #ctravelbox + .box_bottom_dark, #bookline, #top_velvet, #top_velvet + .hasab, #top_velvet + .hasab + .hasab, #divanybox, #hgbox, #ml_kep, #top_tc, #top_tc + .hasab, #top_tc + .hasab + .hasab, #travelbox, #ongo_rotate, .box_bottom_dark, #ongobox, .ajanlok, .blogbox, .box_bottom_light, #tulelokeszlet_szeles, #rotate_ongo_ctravel_travelo, #travelo_rotate, #travelo_box, #top_portfolio, #top_portfolio + .hasab, #top_portfolio + .hasab + .hasab, #divanybox_szeles, #divanybox_szeles + .hasab, #divanybox_s
@KTamas
KTamas / bookmarklet_stats.rb
Created Oct 8, 2012
Rukkola bookmarklet stats
View bookmarklet_stats.rb
#!/usr/bin/env ruby
require 'gchart'
accesslog = "/opt/nginx/logs/access.log"
count = 30
data = {}
count.times do |c|
day = `date -d "-#{c+1} day" '+%d/%b/%Y'`.gsub("\n", '')
data[day] = `cat #{accesslog} |grep 'csak_happolhatoak' | grep 'rukkola.hu' | grep '#{day}' | awk '{print $1}' | sort | uniq| wc -l`.to_i
@KTamas
KTamas / bookmarklet_loader.js
Created Oct 7, 2012
Bookmarklet loader for wordpress
View bookmarklet_loader.js
(function() {
var a=document.createElement('script');
a.setAttribute('src','//my/bookmarklet/source.js');
document.body.appendChild(a)
}());
@KTamas
KTamas / index.css
Created Sep 28, 2012
index.hu "csak a lenyeg" edition
View index.css
/* Removes Velvet, Totalcar, Porfolio, Divany, HG and some other unnecessary stuff. For the best experience, use it with adblock. */
/* based on http://keki.tumblr.com/post/15183352367/angeldaynak-szeretettel and userscripts.org/scripts/show/69639 */
#featured, #rss, #indabox, .adocean, #cikklistak, #szolg, .hirdetes, .cimlapozo-anyag .microsite_dummy, .hirdetes_bottom, .linkroll, #idojaras_top, #idojaras, #idojaras_bottom, #idojaras_bottom + .doboz_bottom, .partnerek, .partnerek + .box_bottom_light, #ctravelbox, #ctravelbox + .box_bottom_dark, #bookline, #top_velvet, #top_velvet + .hasab, #top_velvet + .hasab + .hasab, #divanybox, #hgbox, #ml_kep, #top_tc, #top_tc + .hasab, #top_tc + .hasab + .hasab, #travelbox, #ongo_rotate, .box_bottom_dark, #ongobox, .ajanlok, .blogbox, .box_bottom_light, #tulelokeszlet_szeles, #rotate_ongo_ctravel_travelo, #travelo_rotate, #travelo_box, #top_portfolio, #top_portfolio + .hasab, #top_portfolio + .hasab + .hasab, #divanybox_szeles, #divanybox_szeles + .hasab, #divanybox_s
@KTamas
KTamas / grab.rb
Created Jul 2, 2012
grabs Jenny Lawson's column from cafemom, creates a mobi-compatible html
View grab.rb
#!/usr/bin/env ruby
# encoding: UTF-8
require 'rubygems'
require 'open-uri'
require 'nokogiri'
PAGES = [0, 11, 21, 31]
BASE_URL = "http://thestir.cafemom.com/column/ill_advised?next="
HEADER = '<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /></head><body>' + "\n"
View index.html
<html>
<head>
<script src="http://code.jquery.com/jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$(document).scroll(function(e) {
if ($('body').scrollTop() < 0) {
$('#refreshing').show();
setTimeout(function(){if ($('body').scrollTop() < 0) { location.reload(true)} else { $("#refreshing").hide(); }}, 1000);
}
View index.html
<html>
<head>
<script src="http://code.jquery.com/jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$(document).scroll(function(e) {
if ($('body').scrollTop() < 0) {
$('#refreshing').show();
setTimeout(function(){location.reload(true)}, 1000);
}
View app.js
var App = Em.Application.create();
App.Player = Em.Object.extend({
level: 1,
name: null,
up: function() {
this.set('level', this.get('level') + 1);
}
});
App.playerController = Em.ArrayController.create({
You can’t perform that action at this time.