Skip to content

Instantly share code, notes, and snippets.

Popa Marius Adrian mariuz

Block or report user

Report or block mariuz

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
@mariuz
mariuz / firebird3_example.py
Last active Aug 29, 2015
firebird3 srp auth example
View firebird3_example.py
import firebirdsql
conn = firebirdsql.connect(
host='localhost',
database='/tmp/test.fdb',
auth_plugin_list=("Srp",),
user='SYSDBA',
password='masterkey',
wire_crypt=True)
cur = conn.cursor()
@mariuz
mariuz / ubuntu_lucid_patch.diff
Created Feb 28, 2014
ubuntu lucid builld patch for debian building
View ubuntu_lucid_patch.diff
diff -Nru firebird2.5-2.5.2.26540.ds4/debian/compat firebird2.5-2.5.2.26540.ds4/debian/compat
--- firebird2.5-2.5.2.26540.ds4/debian/compat 2013-10-06 23:12:41.000000000 +0300
+++ firebird2.5-2.5.2.26540.ds4/debian/compat 2013-11-08 11:07:31.000000000 +0200
@@ -1 +1 @@
-9
+7
diff -Nru firebird2.5-2.5.2.26540.ds4/debian/control firebird2.5-2.5.2.26540.ds4/debian/control
--- firebird2.5-2.5.2.26540.ds4/debian/control 2013-10-10 20:52:48.000000000 +0300
+++ firebird2.5-2.5.2.26540.ds4/debian/control 2013-11-08 10:29:32.000000000 +0200
@@ -1,18 +1,17 @@
@mariuz
mariuz / MON$ATTACHMENTS.sql
Created Mar 2, 2014
MON$ATTACHMENTS query example
View MON$ATTACHMENTS.sql
SELECT r.RDB$DB_KEY, r.MON$ATTACHMENT_ID, r.MON$SERVER_PID, r.MON$STATE,
r.MON$ATTACHMENT_NAME, r.MON$USER, r.MON$ROLE, r.MON$REMOTE_PROTOCOL,
r.MON$REMOTE_ADDRESS, r.MON$REMOTE_PID, r.MON$CHARACTER_SET_ID,
r.MON$TIMESTAMP, r.MON$GARBAGE_COLLECTION, r.MON$REMOTE_PROCESS,
r.MON$STAT_ID
FROM MON$ATTACHMENTS r
View gist:9787422
<script language="JavaScript">
// Determine browser.
var isMinNS4 = 0;
var isMinIE4 = 0;
var NS6 = 1;
var origWidth; // Vars for NS resizing
var origHeight;
View openssh6.6p1_precise.diff
diff -Nru openssh-6.6p1/debian/changelog openssh-6.6p1/debian/changelog
--- openssh-6.6p1/debian/changelog 2014-03-31 11:20:50.000000000 +0000
+++ openssh-6.6p1/debian/changelog 2014-04-02 11:38:06.000000000 +0000
@@ -1,3 +1,9 @@
+openssh (1:6.6p1-2ubuntu1) precise; urgency=low
+
+ * add changes for 12.04 lts
+
+ -- Ubuntu <ubuntu@assetpanda.com> Wed, 02 Apr 2014 11:37:51 +0000
+
@mariuz
mariuz / unicorn_init.sh
Created Apr 4, 2014
unicorn init script for a system wide rvm (app runs under ubuntu user and is configured with pid in tmp, can be tweaked)
View unicorn_init.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: unicorn initscript
# Description: unicorn
### END INIT INFO
View deploy.rb
# encoding: UTF-8
# Place in config/deploy.rb
# See: https://gist.github.com/joost/9343156
# Adapted to work with rbenv
namespace :rails do
desc "Open the rails console on primary app server"
task :console do
on roles(:app), primary: true do
rails_env = fetch(:stage)
execute_interactively "#{bundle_cmd} #{current_path}/script/rails console #{rails_env}"
@mariuz
mariuz / mezanine upgrade
Created Apr 22, 2014
Mezzanine-3.1.1 upgrade
View mezanine upgrade
sudo pip install --upgrade mezzanine
Downloading/unpacking mezzanine from https://pypi.python.org/packages/2.7/M/Mezzanine/Mezzanine-3.1.1-py2.py3-none-any.whl#md5=80dd2e7a9d55a89764040500239e28bb
Downloading Mezzanine-3.1.1-py2.py3-none-any.whl (5.7MB): 5.7MB downloaded
Downloading/unpacking grappelli-safe>=0.3.8 (from mezzanine)
Downloading grappelli_safe-0.3.8-py2.py3-none-any.whl (876kB): 876kB downloaded
Requirement already up-to-date: bleach>=1.4 in /usr/local/lib/python2.7/dist-packages (from mezzanine)
Requirement already up-to-date: requests-oauthlib>=0.4 in /usr/local/lib/python2.7/dist-packages (from mezzanine)
Downloading/unpacking django>=1.4.10,!=1.6.0,<1.7 from https://pypi.python.org/packages/py2.py3/D/Django/Django-1.6.3-py2.py3-none-any.whl#md5=e5937a962ce1298ac67d1aa7484883a6 (from mezzanine)
Downloading Django-1.6.3-py2.py3-none-any.whl (6.7MB): 6.7MB downloaded
Requirement already up-to-date: tzlocal==1.0 in /usr/local/lib/python2.7/dist-packages (from mezzanine)
View node-firebird-libfbclient.js
var cfg = require("./config").cfg;
var fb = require('../node_firebird/firebird');
var util = require('util');
var events = require('events');
var http = require('http');
var con = fb.createConnection();
con.connectSync(cfg.db, cfg.user, cfg.password, cfg.role);
View firebird.vim
" Vim syntax file
" Language: SQL
" Maintainer: Scott Morgan < blumf7 at gmail dot com >
" Last Change: 2014-06-13
" Version: 1.0
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
You can’t perform that action at this time.