Skip to content

Instantly share code, notes, and snippets.

@pygy
pygy / PureLPeg.lua
Last active December 15, 2015 20:40
-- A more complete version is now available here:
-- https://github.com/pygy/LuLPeg
-- PureLPeg.lua
-- a WIP LPeg implementation in pure Lua, by Pierre-Yves Gérardy
-- released under the Romantic WTF Public License (see the end of the file).
-- Captures and locales are not yet implemented, but the rest works quite well.
-- UTF-8 is supported out of the box
--
@perky
perky / ProFi.lua
Created May 30, 2012 20:32
ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )
ProFi:stop()
@fernandoaleman
fernandoaleman / rpm-digital-signature.sh
Created November 18, 2011 15:18
How to sign your custom RPM package with GPG key
# How to sign your custom RPM package with GPG key
# Step: 1
# Generate gpg key pair (public key and private key)
#
# You will be prompted with a series of questions about encryption.
# Simply select the default values presented. You will also be asked
# to create a Real Name, Email Address and Comment (comment optional).
#
# If you get the following response:
@peo3
peo3 / setup_lxc_rootfs_fedora15.sh
Created August 12, 2011 14:52
How to boot up Fedora 15 with systemd inside Libvirt LXC
#!/bin/sh
# Setup a rootfs of Fedora 15 for libvirt lxc
#
# The rootfs is based on http://download.openvz.org/template/precreated/fedora-15-x86_64.tar.gz
#
# See also
# - http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg01707/lxc-fedora.in
if [ $# != 1 ]; then
@saghul
saghul / zmq_websocket_gateway.py
Created June 28, 2011 18:49
A ZeroMQ - WebSocket gateway
# coding=utf8
# Copyright (C) 2011 Saúl Ibarra Corretgé <saghul@gmail.com>
#
import hashlib
import os
import re
import socket
import struct