This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<class T> | |
class LimitedSizeAllocator { | |
//http://stackoverflow.com/questions/1591591/can-one-leverage-stdbasic-string-to-implement-a-string-having-a-length-limitat | |
public: | |
typedef T value_type; | |
typedef std::size_t size_type; | |
typedef std::ptrdiff_t difference_type; | |
typedef T *pointer; | |
typedef const T *const_pointer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
#for debug/scripting | |
#use --no-verify - like this: | |
#git commit -m "init" --no-verify | |
echo "============= RUNNING PRE-COMMIT HOOK\n\n"; | |
$forbidden=array( | |
'var_dump', | |
'print_r', | |
'echo', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
zookeeper: | |
image: confluent/zookeeper | |
ports: | |
- 2181:2181 | |
kafka: | |
#test: bin/kafka-topics --create --zookeeper zookeeper:2181 --replication-factor 1 --partitions 1 --topic test | |
image: confluent/kafka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#pip install dpath | |
def get_yaml_config(path: str): | |
import yaml | |
with open(path, 'r') as ymlfile: | |
cfg = yaml.load(ymlfile) | |
return cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#Field Meaning Example | |
#/C= Country GB | |
#/ST= State London | |
#/L= Location London | |
#/O= Organization Global Security | |
#/OU= Organizational Unit IT Department | |
#/CN= Common Name example.com | |
#CA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#soffice --headless --convert-to csv:"Text - txt - csv (StarCalc)":44,34,76,1,,true,false jira_csv/OrgPerson.ods | |
#params explained: | |
# https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options#Filter_Options_for_the_CSV_Filter | |
#44, #1, the ASCII code for the separator | |
#34, #2, text quoting (34 is ", 44 is ' and so on..) | |
#76, #3, utf8 | |
#1 #4, | |
#, #5, field delimiter default | |
#, #6, text delimiter default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sample of using POCO's Thread | |
#include "Poco/Runnable.h" | |
#include "Poco/Thread.h" | |
#include <iostream> | |
using namespace std; | |
class Worker:public Poco::Runnable{ | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
cout << "Hello, World!"; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $FreeBSD$ | |
# openal-soft makefile for openal-soft patched (https://github.com/digitalist/openal-soft) | |
# fixes telegram-desktop, assaultcube and I think every openal-soft dependent packages | |
PORTNAME= openal-soft | |
PORTVERSION= 1.18.2 | |
PORTREVISION= 1 | |
CATEGORIES= audio | |
USE_GITHUB= yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://xwmw.org/qastools/download.html | |
cd /usr/ports/devel/libudev-devd/ && sudo make install | |
sudo ln -s /usr/local/lib/libudev.so /lib/libudev.so | |
cd /tmp/ | |
git clone git://git.code.sf.net/p/qastools/git | |
cd qastools-git | |
mkdir build | |
mkdir install |
OlderNewer