Skip to content

Instantly share code, notes, and snippets.

View alhafoudh's full-sized avatar

Ahmed Al Hafoudh alhafoudh

View GitHub Profile
diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp
index 7925c6e..fc26161 100644
--- a/src/pgm_socket.cpp
+++ b/src/pgm_socket.cpp
@@ -325,7 +325,7 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
// Set IP level parameters.
{
// Multicast loopback disabled by default
- const int multicast_loop = 0;
+ const int multicast_loop = 1;
LINUX=$(shell uname | grep Linux | wc -l | xargs echo)
DEPS=../deps
ifeq ($(LINUX),1)
ZMQ_FLAGS="--with-pgm=libpgm-5.2.122"
else
ZMQ_FLAGS="--with-pgm=libpgm-5.2.122"
endif
ifndef ZEROMQ_VERSION
@alhafoudh
alhafoudh / create_postgresql_vendor_binary.sh
Created July 2, 2013 06:22
Create postgresql-9.2.4 vendor binary for Heroku xxx buildpack
wget http://ftp.postgresql.org/pub/source/v9.2.4/postgresql-9.2.4.tar.bz2
tar xjf postgresql-9.2.4.tar.bz2
vulcan create
vulcan build -v -n postgresql-9.2.4 -s ./postgresql-9.2.4 -c "./configure --prefix /app/vendor/postgresql-9.2.4 --enable-thread-safety --without-docdir --with-openssl && make install"
USE TestDB
-- SQL Join visualization
-- http://www.codeproject.com/KB/database/Visual_SQL_Joins/Visual_SQL_JOINS_orig.jpg
DROP TABLE [dbo].Authors
DROP TABLE [dbo].Books
CREATE TABLE [dbo].[Authors](
[id] [int] IDENTITY(1,1) NOT NULL,
@alhafoudh
alhafoudh / stickies-to-notes.rb
Created July 11, 2012 10:11
OSX 10.8 Mountain Lion - Migrate your stickies from Stickies.app to Notes.app
# Author: Ahmed Al Hafoudh <[email protected]
#
# Usage: ruby stickies-to-notes.rb
#
# Prerequisites:
# gem install rb-appscript
#
require 'appscript'
require 'osax'