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

Script portfolio

  • ezmail.rb: Takes an e-mail stored in file and delivers. Uses RubyGems and mail gem
  • csspp.sh: "Unpacks" a minified css. It can take a file as an argument, or if it is omitted, assumes you want to feed the script from stdin.
  • epatch.sh: Bulk patching script. Based on Gentoo Ebuild's function with similar name, but simpler, and less Gentoo-ish.
  • kayako_to_ts.rb: Converts Kayako language files to Qt TS (Translation source) file. XML handling.
  • posterous.awk: CLI publisher to posterous. Maybe uses a deprecated API.
  • twitter.awk: CLI publisher to twitter. Maybe uses a deprecated API.
@hron84
hron84 / gist:1838983
Created February 15, 2012 21:00
Rakefile.bootstrap
require 'rbconfig'
require 'rubygems'
require 'rubygems/installer'
require 'rubygems/dependency_installer'
require 'yaml'
def gem_install(gem, options = {})
Gem::Deprecate.skip = true
hu:
devise:
confirmations:
confirmed: "Fiók megerősítve. Bejelentkezve a felhasználói fiókba."
send_instructions: "A megadott címre egy email érkezik a megerősítő linkkel."
send_paranoid_instructions: "Ha az email cím már létezik az adatbázisban, egy emailt küldtünk a további teendőkkel a fiók megerősítéséhez."
failure:
already_authenticated: "Már belépett."
inactive: "A fiók még nincs aktiválva."
invalid: "Hibás email cím vagy jelszó."
class Access
belongs_to :user
belongs_to :account
end
class User
has_many :accesses
has_many :accounts, :through => :accesses
end
module ApplicationHelper
def b(value, options = {})
options = {
:true => :positive,
:false => :negative,
:scope => [:boolean],
:locale => I18n.locale, # <- It makes easy to avoid conditional run
}.merge options
# avoid passing nil, or some desctructive value
$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(
@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)
@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 / 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 / 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