Skip to content

Instantly share code, notes, and snippets.

@zbyhoo
zbyhoo / gitp2svnp.rb
Last active December 23, 2016 10:37
Simple script converting git patch file into tortoise merge compatible format. Usage: gitp2svnp.rb <git_patch_file>
#!/usr/bin/ruby
if ARGV.length != 1
puts "usage: git2svn <file_name>"
puts " file_name - git patch file name"
exit
end
separator = "\n===================================================================\n"
new_file = false
@sixtenbe
sixtenbe / analytic_wfm.py
Last active May 1, 2024 02:29 — forked from endolith/peakdet.m
Peak detection in Python
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See
@yunzheng
yunzheng / eicfg_remover.py
Created November 13, 2011 17:01
ei.cfg removal/restore util in Python
#!/usr/bin/env python
"""
eicfg_remover.py
Based on Kai Liu's eicfg_remover.c @ http://code.kliu.org/misc/winisoutils/
"""
import sys
from binascii import crc_hqx, hexlify
@dupuy
dupuy / README.rst
Last active May 5, 2024 18:42
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

  1. Connection timeouts
  2. PR/PW support
  3. Complete connection manager (use multiple hosts, retry failed ops on other nodes, prefer non-failing nodes)
  4. Make protobuffs dependency installation sane
  5. Automatically select correct transport for each operation
  6. Warn/raise on Luwak usage if not present on server
  7. Construct server URLs based on available resources (using "/" url to detect)
  8. Stats, Server info support
  9. Complete secondary index support
  10. Add sibling resolution strategies/policies

Riak Users,

I've been working on some new features for Riak's secondary indexes (2i), and I wanted to get some feedback from the community before proceeding much further.

How does 2i work currently?

2i lets you query index values with

@ionrock
ionrock / lockfile.py
Created June 29, 2012 04:14
A file locking example
"""
A file lock implementation that tries to avoid platform specific
issues. It is inspired by a whole bunch of different implementations
listed below.
- https://bitbucket.org/jaraco/yg.lockfile/src/6c448dcbf6e5/yg/lockfile/__init__.py
- http://svn.zope.org/zc.lockfile/trunk/src/zc/lockfile/__init__.py?rev=121133&view=markup
- http://stackoverflow.com/questions/489861/locking-a-file-in-python
- http://www.evanfosmark.com/2009/01/cross-platform-file-locking-support-in-python/
- http://packages.python.org/lockfile/lockfile.html
@adrienbrault
adrienbrault / purge.sh
Created September 24, 2012 10:02
Script to reduce VM size before packaging for vagrant
#!/bin/sh
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5
@Macil
Macil / local.usr.bin.skype
Last active January 31, 2017 06:14
Skype AppArmor profile(tested with Ubuntu 14.10 and Skype 4.3)
#include <tunables/global>
/usr/bin/skype {
#include <abstractions/base>
#include <abstractions/user-tmp>
#include <abstractions/audio>
#include <abstractions/nameservice>
#include <abstractions/ssl_certs>
#include <abstractions/fonts>
#include <abstractions/ibus>
#include <abstractions/dbus>
@proudlygeek
proudlygeek / nfs-tunnel.md
Last active May 11, 2024 03:25
Mount NFS Folder via SSH Tunnel

1. Install NFS on Server

Install the required packages (Ubuntu 12.04):

apt-get install nfs-kernel-server portmap

2. Share NFS Folder

Open the exports file:

vim /etc/exports