Skip to content

Instantly share code, notes, and snippets.

View gergelypolonkai's full-sized avatar

Gergely Polonkai gergelypolonkai

View GitHub Profile
@gergelypolonkai
gergelypolonkai / output.log
Created December 2, 2012 14:23
db:schema:load error without minitest in Gemfile
$ RAILS_ENV=production bundle exec rake db:schema:load --trace
** Invoke db:schema:load (first_time)
** Invoke environment (first_time)
** Invoke rails_admin:disable_initializer (first_time)
** Execute rails_admin:disable_initializer
[RailsAdmin] RailsAdmin initialization disabled by default. Pass SKIP_RAILS_ADMIN_INITIALIZER=false if you need it.
** Execute environment
rake aborted!
cannot load such file -- minitest/unit
/home/polesz/.gem/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
@gergelypolonkai
gergelypolonkai / backtrace.txt
Created December 13, 2012 10:28
debug_backtrace() for symfony/symfony #6203
array(8) {
[0] =>
array(5) {
'function' =>
string(11) "unserialize"
'class' =>
string(46) "Symfony\Component\Config\Resource\FileResource"
'object' =>
class Symfony\Component\Config\Resource\FileResource#558 (1) {
private $resource =>
@gergelypolonkai
gergelypolonkai / composer.json
Created February 21, 2013 16:11
Composer files for error reporting
{
"name": "brokernetgroup/intranet",
"description": "BROKERNETGroup Tanácsadói Portál",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
#! /bin/bash
#
# A generalised converter to convert all files of
# a given extension in a directory to another
# type.
#
# I simply assume that yourConverter can detect
# the input files' type, and figure out the
# destination type from $ext_out
@gergelypolonkai
gergelypolonkai / Makefile
Created July 31, 2014 22:16
GdauiDataStore strangeness
all:
sqlite3 test.db "CREATE TABLE IF NOT EXISTS test (id integer not null primary key, name varchar(20) not null)"
sqlite3 test.db "DELETE FROM test"
sqlite3 test.db "INSERT INTO test VALUES (1, 'a')"
gcc -o test -Wall -g -O2 `pkg-config --cflags --libs gtk+-3.0 libgda-ui-5.0 libgda-sqlite-5.0` test.c
@gergelypolonkai
gergelypolonkai / git-branches-with-tracking.sh
Last active August 29, 2015 14:04
List git branches and their remote tracking branch, if any
#! /bin/sh
COLUMN=`which column 2> /dev/null`
if test -z $COLUMN
then
echo "\`column' is not found in PATH. Cannot continue."
exit 1
fi
current_branch=`git rev-parse --abbrev-ref HEAD`
@gergelypolonkai
gergelypolonkai / gergelypolonkai.modules
Created October 13, 2014 22:52
My JHBuild moduleset
<?xml version="1.0" standalone="no"?><!--*- mode: nxml -*-->
<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
<moduleset>
<repository type="git" name="github.com"
href="git://github.com/"/>
<autotools id="gnome-break-timer">
<branch repo="github.com" module="GNOME/gnome-break-timer"/>
</autotools>
[alias]
bisect-fixed = bisect bad
bisect-unfixed = bisect good
@gergelypolonkai
gergelypolonkai / round-to-n-decimals.el
Created April 27, 2015 07:50
Round number to N decimals
(defun get-number-at-point ()
(interactive)
(skip-chars-backward "0123456789.-")
(or (looking-at "[0123456789.-]+")
(error "No number at point"))
(string-to-number (match-string 0)))
(defun round-number-at-point-to-decimals (decimal-count)
(interactive "NDecimal count: ")
(let ((mult (expt 10 decimal-count)))
@gergelypolonkai
gergelypolonkai / config.yml
Created April 27, 2015 07:55
Site specific session name with Symfony 2
session:
name: SiteSpecificSessionName
lifetime: 3600