Skip to content

Instantly share code, notes, and snippets.

View apetresc's full-sized avatar

Adrian Petrescu apetresc

View GitHub Profile
@apetresc
apetresc / .gdbinit
Created June 13, 2010 16:52
.gdbinit file that pretty-prints STL functions.
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
@apetresc
apetresc / AWS SDK for Java build.xml
Created May 21, 2010 20:04
A regular Ant build.xml file for the AWS SDK for Java, for those of us who prefer not to use Maven. Generates a JAR essentially identical to the one distributed by Amazon.
<project name="aws-java-sdk" default="build" basedir=".">
<property name="appname" value="aws-java-sdk" />
<property name="appversion" value="1.0.004" />
<property name="third-party.root" location="${basedir}/third-party" />
<property name="src.dir" location="${basedir}/src/main/java" />
<property name="resources.dir" location="${basedir}/src/main/resources" />
<property name="build.dir" location="${basedir}/build" />
@apetresc
apetresc / redelegate-cro.sh
Last active March 28, 2023 05:44
A script to automatically claim Crypto.org CRO staking rewards and re-stake them
#!/bin/bash -e
# redelegate-cro.sh is a script that automatically claims all your delegation
# rewards (across any number of validators) in a single transaction (assuming a
# minimum reward threshold is met, to avoid spurious transactions). The rewards
# are then automatically redelegated to the provided validator address, leaving
# behind at least a 0.005 CRO buffer to ensure there is always enough for
# regular transaction fees.
#
# The idea is that it is safe to run this script on a fixed cron schedule and
@apetresc
apetresc / convert_mtgo.py
Last active August 31, 2021 19:32
A script to convert an MTGO .csv export into a Decked Builder .coll file.
from collections import defaultdict
import csv
import os
import sys
set_map = {
'ALR': 'Alara Reborn',
'AL': 'Alliances',
'AQ': 'Antiquities',
'AP': 'Apocalypse',
@apetresc
apetresc / README.md
Last active July 20, 2021 18:14
A script to filter a PGN game collection by a minimum time control

Installation

The script requires the python-chess library which can be installed via:

pip install -r requirements.txt

Usage

@apetresc
apetresc / foxyproxy.json
Created October 25, 2017 19:01
A FoxyProxy 6.x (for Firefox) version of the AWS EMR filters
{
"mode": "patterns",
"proxySettings": [
{
"title": "EMR SOCKS Proxy",
"type": 3,
"color": "#cc8c2a",
"address": "localhost",
"port": 8157,
"proxyDNS": true,
@apetresc
apetresc / HealthServlet.java
Created September 21, 2011 22:54
Jetty health servlet
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HealthServlet extends HttpServlet {
private static final Logger logger = LoggerFactory.getLogger(HealthServlet.class);
diff --git a/.SRCINFO b/.SRCINFO
index 41e47fb..dff8005 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = websocketpp-git-dev
pkgdesc = C++/Boost Asio based websocket client/server library, Develop branch
- pkgver = 0.7.0.1685.19cad99
+ pkgver = 0.8.1.1696.c6d7e29
pkgrel = 1
<settings>
<profiles>
<profile>
<id>hadoop-azure</id>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-azure</artifactId>
<version>${hadoop.version}</version>
<exclusions>