Skip to content

Instantly share code, notes, and snippets.

id: nil, employed_since: nil, consumed_points: 0, current_points: 10, last_visit_at: "2013-09-15 16:00:33", nickname: "Viktoria", user_account_id: nil, total_visits: 257, total_points: 26325, registration_date: "2010-11-09 16:30:54", branch_id: 8, branch_level_id: 4360, tombola_points: 25700, terminal_id: 8, recommender_id: nil, phone: "0918470930", email: nil, last_vip_notification: "2013-09-15 16:36:16", note: nil>
saving 25 kokot #<UserBranch id: 305416, user_id: 310024, branch_id: 8, is_present: true, last_action_at: "2013-09-15 16:36:16", created_at: "2010-11-12 16:49:25", updated_at: "2013-09-15 16:36:16", terminal_id: 8>
saving 24 Skap
Couldn't find ItemLog with id=174330213
kokot #<ItemLog id: 174330213, user_id: nil, points: nil, event_time: nil, happy_hour_coefficient: nil, item_id: nil, category_type: nil, user_account_id: nil, order_id: nil, user_total_visits: nil, user_current_points: nil, user_total_points: nil, user_consumed_points: nil, user_level_id: nil, created_at: nil, updated_at: n
@haad
haad / gist:6608476
Created September 18, 2013 12:29
fix db table owner in postgres
for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" casis_term` ; do psql -c "alter table $tbl owner to innrm" casis_term; done
@haad
haad / casis error
Last active December 21, 2015 20:49
root@innovaautoinstall:/srv/apps/casis_term/current# su - postgres
postgres@innovaautoinstall:~$ dropdb casis_term
postgres@innovaautoinstall:~$ psql -l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+-----------+---------+-------+-----------------------
postgres | postgres | SQL_ASCII | C | C |
template0 | postgres | SQL_ASCII | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | SQL_ASCII | C | C | =c/postgres +
# ExpressID AFIS 3 - Innovatrics ExpressID AFIS 3 AfisMQ daemon
#
# This is ExpressID AFIS 3 upstart script (put it into /etc/init/ and use 'initctl status|start|stop eafis3' command)
description "ExpressID AFIS 3"
# CONFIGURATION
env PROG="/opt/expressid_afis3/eafis3-cluster/eafis3.sh"
start on filesystem or runlevel [2345]
@haad
haad / postgresql.conf
Last active March 7, 2017 02:30
Postgresql upstart init script
description "PostgreSQL 9.1 Server"
author "PostgreSQL"
start on runlevel [2345]
stop on runlevel [016]
expect fork
respawn
env POSTGRESQL_HOME="/var/lib/postgresql/9.1/main"
@haad
haad / gist:5986781
Created July 12, 2013 18:46
homebrew libssh head formula
require 'formula'
class Libssh < Formula
homepage 'http://www.libssh.org/'
url 'https://red.libssh.org/attachments/download/41/libssh-0.5.4.tar.gz'
sha1 '4a372378db8fffaf28d5c79d80b2235843aa587c'
head 'git://git.libssh.org/projects/libssh.git'
if build.head?
@haad
haad / gist:5904725
Created July 1, 2013 21:19
File level dedup with rsync
# from http://ask.slashdot.org/comments.pl?sid=2604202&cid=38589562
# First I sync from the remote directory to a local base directory:
rsync --partial -z -vlhprtogH --delete [email protected]:/etc/ /backup/server/www/etc/base/
#Then I sync that to the daily backup. Files that have not changed are hard-linked between all the days that share them. It very efficient and simple, and retrieving files is as simple as doing a directory search.
rsync -vlhprtogH --delete --link-dest=/backup/server/www/etc/base/ /backup/server/www/etc/base/ /backup/server/www/etc/2012-01-04
@haad
haad / asterisk
Created May 24, 2013 09:02
asterisk coredumps
#0 0x00007f80d9f67631 in ?? () from /lib64/libc.so.6
#0 0x00007f80d9f67631 in ?? () from /lib64/libc.so.6
#1 0x00007f809326a710 in ?? () from /usr/lib64/asterisk/modules/res_config_ldap.so
#2 0x00000000004a0388 in ast_load_realtime_multientry ()
#3 0x00007f8095f7b05b in ?? () from /usr/lib64/asterisk/modules/pbx_realtime.so
#4 0x00007f8095f7b3a7 in ?? () from /usr/lib64/asterisk/modules/pbx_realtime.so
#5 0x0000000000523398 in pbx_find_extension ()
#6 0x00000000005282a9 in ?? ()
#7 0x0000000000528be4 in ast_exists_extension ()
#8 0x00000000004cf930 in ast_bridge_call ()
[root@storage02 ~]# grep 'Mog:: res->code' /var/log/messages | grep -v OK,
Jan 28 09:42:19 storage02 mogilefsd[29643]: Mog:: res->code = 500, res->message = read timeout, res->status_line = 500 read timeout, res->base = http://192.168.106.103:7500/dev3/0/022/475/0022475565.fid
Jan 28 11:02:01 storage02 mogilefsd[29644]: Mog:: res->code = 500, res->message = Status read failed: Connection reset by peer, res->status_line = 500 Status read failed: Connection reset by peer, res->base = http://192.168.106.103:7500/dev3/0/022/485/0022485305.fid
Jan 28 11:02:06 storage02 mogilefsd[29635]: Mog:: res->code = 500, res->message = Status read failed: Connection reset by peer, res->status_line = 500 Status read failed: Connection reset by peer, res->base = http://192.168.106.103:7500/dev3/0/022/485/0022485344.fid
Jan 28 14:31:54 storage02 mogilefsd[29653]: Mog:: res->code = 500, res->message = Status read failed: Connection reset by peer, res->status_line = 500 Status read failed: Connection reset by peer, res->base = htt
@haad
haad / gist:4622816
Created January 24, 2013 15:12
QT5 with old arm copiler toolchain
tCore/5.0.1 -I../../include/QtCore/5.0.1/QtCore -Iglobal -I../3rdparty/zlib -I../3rdparty/pcre -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared -o .obj/release-shared/qstatemachine.o statemachine/qstatemachine.cpp
io/qprocess_unix.cpp: In member function 'bool QProcessPrivate::processStarted()':
io/qprocess_unix.cpp:915: warning: dereferencing type-punned pointer will break strict-aliasing rules
rm -f libQt5Core.so.5.0.1 libQt5Core.so libQt5Core.so.5 libQt5Core.so.5.0
arm-iwmmxt-linux-gnueabi-g++ -Wl,--no-undefined -Wl,-O1 -shared -Wl,-soname,libQt5Core.so.5 -o libQt5Core.so.5.0.1 .obj/release-shared/qabstractanimation.o .obj/release-shared/qvariantanimation.o .obj/release-shared/qpropertyanimation.o .obj/release-shared/qanimationgroup.o .obj/release-shared/qsequentialanimationgroup.o .obj/release-shared/qparallelanimationgroup.o .obj/release-shared/qpauseanimation.o .obj/release-shared/qatomic_unix.o .obj/release-shared/qglobal.o .obj/release-shared/qlibraryinfo.o .obj/release-shared/qmalloc.o .obj/