Skip to content

Instantly share code, notes, and snippets.

View mloskot's full-sized avatar
🏠
Working from home

Mateusz Łoskot mloskot

🏠
Working from home
View GitHub Profile
@martinmoene
martinmoene / gist:9091556
Created February 19, 2014 13:04
element_or(), container_element_or()
// element_or()
// container_element_or()
#include <map>
#include <vector>
/**
* return element of vector if present, def otherwise.
*/
template< typename E, typename I, typename D >
@anna-is-cute
anna-is-cute / gist
Last active August 29, 2015 14:16
Python3 Gist Client
#!/usr/local/bin/python3
from requests import post
from json import dumps
from sys import stdin
from argparse import ArgumentParser
GITHUB_API_URL = 'https://api.github.com/'
# Provide a personal access token with the gist scope to enable writing gists from your account
PERSONAL_ACCESS_TOKEN = None
@tmcgilchrist
tmcgilchrist / gist:1103621
Created July 25, 2011 05:40
Rails 3 Setup for Oracle 10g XE

Notes on Setting up Oracle 10g XE with Rails

Capturing my notes about setting up an Oracle 10g XE / Rails environment for development work. Tested using the following versions, others may work as well:

  1. Ubuntu 11.04
  2. Ruby 1.9.2
  3. Rails 3
  4. Oracle 10 XE
@hellekin
hellekin / .zsh-prompt
Created November 28, 2011 19:43
not yet a promptinit theme, but pretty nice already
# -*- sh-mode -*-
#
## ZSH PROMPT
#
# {{{ PROMPT SETTINGS
PROMPT_SUBST=1 # Enable prompt expansion
PROMPT_BANG=1 # Enable ! as history event number
PROMPT_PERCENT=1 # Enable % parameter expansion

Vim Shortcuts

gist-vim.vim

Post current buffer to gist, using default privacy option
:Gist

Edit the gist ( must open it first )
:Gist -e

@springmeyer
springmeyer / perf-guide.md
Last active October 6, 2015 05:38
Basics of performance profiling for users that want fast programs
@bravnsgaard
bravnsgaard / gist:5595699
Created May 16, 2013 22:46
sscanf warnings in soci_sqlite3 backend.
From bcdcd43667348fe64154e4067199a6745b73d0b3 Mon Sep 17 00:00:00 2001
From: Brian Ravnsgaard Riis <brian@ravnsgaard.net>
Date: Fri, 17 May 2013 00:38:23 +0200
Subject: [PATCH] Fixed some sscanf bugs in the SQLite backend.
---
vendor/soci/backends/sqlite3/common.h | 8 ++++++++
vendor/soci/backends/sqlite3/standard-use-type.cpp | 8 ++++++++
vendor/soci/backends/sqlite3/vector-use-type.cpp | 8 ++++++++
3 files changed, 24 insertions(+)
@mloskot
mloskot / Scapular-Hanging-Progressions.md
Created June 30, 2016 10:20
Scapular Hanging Progressions by Dewey Nielsen
@dbb613
dbb613 / gist:e76230a1c58af4e02b14
Last active July 17, 2016 20:32
Examples of Vertica ODBC ini files
NOTE: tabs seem to matter under PHP eventhough not for isql
david@OptiPlex-745:/usr/local/etc$ cat odbc.ini
[ODBC Data Sources]verticadsn = VMart
[verticadsn]Description = Vertica Database using ODBC Driver
Driver = /opt/vertica/lib64/libverticaodbc.so
Servername = localhost
Database = VMart
UserName = dbadmin