Skip to content

Instantly share code, notes, and snippets.

View hron84's full-sized avatar
🔫
Hunting bugs

Gabor Garami hron84

🔫
Hunting bugs
View GitHub Profile
#!/usr/bin/env ruby
require 'uri'
require 'net/http'
require 'open-uri'
if ARGV.size < 1 or ARGV[0] == '--help'
puts "Usage: #{File.basename(__FILE__)} DOMAIN [NS]"
exit 1
end
package me.hron.koponyeg;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.WebView;
@hron84
hron84 / preinitializer.rb
Created January 2, 2011 10:57
preinitializer.rb
begin
require "rubygems"
require "bundler"
if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.5")
raise RuntimeError, "Your bundler version is too old." +
"Run `gem install bundler` to upgrade."
end
# Set up load paths for all bundled gems
@hron84
hron84 / haml2erb
Created March 6, 2011 23:42 — forked from jzajpt/haml2erb
haml2erb
#!/usr/bin/ruby
require 'rubygems'
require 'haml'
class ErbEngine < Haml::Engine
def push_script(text, opts = {} )
push_text "<%= #{text.strip} %>"
end
@hron84
hron84 / checkdns.rb
Created April 26, 2011 10:09
Check domain on domain.hu
#!/usr/bin/env ruby
require 'uri'
require 'net/http'
require 'iconv'
if ARGV.size < 1 or ARGV[0] == '--help'
puts "Usage: #{File.basename(__FILE__)} DOMAIN"
exit 1
end
@hron84
hron84 / netbeans.desktop
Created May 10, 2011 06:10
Netbeans Linux shortcut
[Desktop Entry]
Encoding=UTF-8
Name=NetBeans IDE 7.0
GenericName=NetBeans IDE
Comment=NetBeans IDE
Icon=/opt/netbeans/nb/netbeans.png
Exec=/opt/netbeans/bin/netbeans
Category=Development;IDE;Java;
Type=Application
Terminal=false
@hron84
hron84 / sqlite.pm
Created June 22, 2011 15:27
OTRS SQLite support (Kernel/System/DB/sqlite.pm)
# --
# Kernel/System/DB/mysql.pm - mysql database backend
# Copyright (C) 2001-2011 OTRS AG, http://otrs.org/
# --
# $Id: mysql.pm,v 1.55.2.3 2011/03/01 19:17:30 en Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
@hron84
hron84 / jsonpp.js
Created December 20, 2011 01:14
JSON prettifier
#!/usr/bin/env node
var util = require('util');
var stdin = process.openStdin();
stdin.setEncoding('utf8');
jsdata = '';
@hron84
hron84 / README.md
Created December 29, 2011 01:24
csspp

CSS Pretty Print

This script is formats css files even if they are compressed and/or minified.

It uses standard UNIX utilities to make its work:

  • POSIX sed
  • Perl (5.8 or later)
  • GNU gzip (if you want to uncompress gzipped CSS files, recommended)
$view = new view;
$view->name = 'project_pages';
$view->description = 'Projekt oldalak';
$view->tag = '';
$view->base_table = 'node';
$view->core = 6;
$view->api_version = '2';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Alapértelmezések', 'default');
$handler->override_option('relationships', array(