Skip to content

Instantly share code, notes, and snippets.

View mariuz's full-sized avatar

Popa Marius Adrian mariuz

View GitHub Profile
import json
import logging
import time
import boto3
from botocore.exceptions import ClientError
logger = logging.getLogger(__name__)
sns_resource = boto3.resource('sns')
@mariuz
mariuz / connect_and_query_firebird.ts
Created November 19, 2019 17:24
Connect to firebird database with typescript using node-firebird-driver-native and run some queries
import { createNativeClient, getDefaultLibraryFilename } from 'node-firebird-driver-native';
const connect_options = { username: 'sysdba', password: 'masterkey' }
async function test() {
const client = createNativeClient(getDefaultLibraryFilename());
const attachment = await client.connect('localhost:/tmp/new-db.fdb', connect_options);
const transaction = await attachment.startTransaction();
@mariuz
mariuz / create.ts
Last active November 19, 2019 17:20
create database typescript using node-firebird-driver-native
import { createNativeClient, getDefaultLibraryFilename } from 'node-firebird-driver-native';
const connect_options = { username: 'sysdba', password: 'masterkey' }
async function create() {
const client = createNativeClient(getDefaultLibraryFilename());
const attachment = await client.createDatabase('localhost:/tmp/new-db.fdb', connect_options);
await client.dispose();
}
using UnityEngine;
using System.Collections;
using System;
using System.IO;
public class VideoLoadManager : Singleton<VideoLoadManager>
{
public enum TourType
{
Guided,
using UnityEngine;
using UnityEngine.VR;
public class VRMouseLook : MonoBehaviour {
#if UNITY_EDITOR
public bool enableYaw = true;
public bool autoRecenterPitch = true;
public bool autoRecenterRoll = true;
@mariuz
mariuz / firebird3.0.3.crash
Created May 16, 2017 18:04
firebird3.0.3 crash when compiling on a non sse4 host Pentium(R) Dual-Core CPU E5400
/home/mariuz/Work/firebird/firebird/gen/Release/firebird/bin/gpre_current -m -z -n /home/mariuz/Work/firebird/firebird/src/yvalve/blob.epp /home/mariuz/Work/firebird/firebird/temp/Release/yvalve/blob.cpp
gpre version LI-V3.0.3.32722 Firebird 3.0
*** Error in `/home/mariuz/Work/firebird/firebird/gen/Release/firebird/bin/gpre_current': free(): invalid size: 0x00007f3f7017c2a0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7908b)[0x7f3f6f45f08b]
/lib/x86_64-linux-gnu/libc.so.6(+0x826fa)[0x7f3f6f4686fa]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f3f6f46c12c]
/home/mariuz/Work/firebird/firebird/gen/Release/firebird/bin/gpre_current(+0x93fc0)[0x55c953ed2fc0]
/home/mariuz/Work/firebird/firebird/gen/Release/firebird/bin/gpre_current(+0x8756c)[0x55c953ec656c]
/home/mariuz/Work/firebird/firebird/gen/Release/firebird/bin/gpre_current(+0x8777c)[0x55c953ec677c]
@mariuz
mariuz / sse4_crc32c.patch
Created May 15, 2017 17:05
Fix firebird crc32c compilation withot msse4 compiler flag
diff --git a/builds/posix/prefix.linux b/builds/posix/prefix.linux
index 56d1529570..e0bb64150e 100644
--- a/builds/posix/prefix.linux
+++ b/builds/posix/prefix.linux
@@ -26,7 +26,4 @@ PROD_FLAGS=$(COMMON_FLAGS) $(OPTIMIZE_FLAGS)
#DEV_FLAGS=-DUSE_VALGRIND -p $(COMMON_FLAGS) $(WARN_FLAGS)
DEV_FLAGS=-p $(COMMON_FLAGS) $(WARN_FLAGS)
-# This file must be compiled with SSE4.2 support
-%/CRC32C.o: COMMON_FLAGS += -msse4
@mariuz
mariuz / Firebird3.0.2Trusty.diff
Created May 11, 2017 15:41
The only diff for building Firebird 3.0.2 packages on Ubuntu trusty
diff -Nru firebird3.0-3.0.1.32609.ds4/debian/changelog firebird3.0-3.0.1.32609.ds4/debian/changelog
--- firebird3.0-3.0.1.32609.ds4/debian/changelog 2016-12-12 15:00:04.000000000 +0000
+++ firebird3.0-3.0.1.32609.ds4/debian/changelog 2016-12-13 14:52:44.000000000 +0000
@@ -1,3 +1,9 @@
+firebird3.0 (3.0.1.32609.ds4-12ubuntu7) trusty; urgency=medium
+
+ * remove stamp building
+
+ -- Popa Adrian Marius (Mariuz) <mapopa@gmail.com> Tue, 13 Dec 2016 16:52:19 +0200
+
make utilities
make[3]: Entering directory '/home/mariuz/Work/firebird/firebird/gen'
g++ -pthread -std=c++11 -pthread -Wl,-rpath,/lib -Wl,-rpath,/intl -Wl,--version-script,empty.vers /home/mariuz/Work/firebird/firebird/temp/Release/isql/InputDevices.o /home/mariuz/Work/firebird/firebird/temp/Release/isql/OptionsBase.o /home/mariuz/Work/firebird/firebird/temp/Release/isql/Extender.o /home/mariuz/Work/firebird/firebird/temp/Release/isql/ColList.o /home/mariuz/Work/firebird/firebird/temp/Release/isql/iutils.o /home/mariuz/Work/firebird/firebird/temp/Release/isql/extract.o /home/mariuz/Work/firebird/firebird/temp/Release/isql/isql.o /home/mariuz/Work/firebird/firebird/temp/Release/isql/show.o /home/mariuz/Work/firebird/firebird/temp/Release/common.a -o /home/mariuz/Work/firebird/firebird/gen/Release/firebird/bin/isql -L/home/mariuz/Work/firebird/firebird/gen/Release/firebird/lib -lfbclient -ltommath /home/mariuz/Work/firebird/firebird/gen/Release/firebird/lib/libedit.a -latomic_ops -lm -ldl -lcurses
/home/m
@mariuz
mariuz / flamerobin backtrace.log
Created April 11, 2017 11:25
flamerobin backtrace ubuntu 16.10 wx 3.0
ASSERT INFO:
/usr/include/wx-3.0/wx/strvararg.h(456): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type
BACKTRACE:
[1] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[2] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[3] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[4] wxEvtHandler::TryHereOnly(wxEvent&)
[5] wxEvtHandler::ProcessEventLocally(wxEvent&)
[6] wxEvtHandler::ProcessEvent(wxEvent&)