Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Update 7 Oct 2010: | |
| # - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
| # the WebSocket protocol implementation in the cramp gem does not work | |
| # well with Chrome's (newer) WebSocket implementation. | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
| /* Read this comment first: https://gist.github.com/tonious/1377667#gistcomment-2277101 | |
| * 2017-12-05 | |
| * | |
| * -- T. | |
| */ | |
| #define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */ | |
| #include <stdlib.h> | |
| #include <stdio.h> |
| # Monitoring on interface eth0 | |
| tcpdump -i eth0 -n port 67 and port 68 |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| ##Whitelist IP in ModSecurity | |
| #1. If you need to whitelist an IP in ModSecurity (v2.7+), here’s what to do: | |
| nano /usr/local/apache/conf/modsec2/whitelist.conf | |
| #2. add this line, replacing (#####) with a unique ID number for mod security, I used a version of my whitelisted ip address: | |
| SecRule REMOTE_ADDR "@ipMatch 1.2.3.4" "phase:1,t:none,nolog,allow,ctl:ruleEngine=Off,ctl:auditEngine=Off,id:(#####)" | |
| #3. Then restart apache. |
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| # Copyright (C) 2001-2007 Martin Blais. All Rights Reserved | |
| # Copyright (C) 2010 Bear http://code-bear.com/bearlog/ | |
| # Copyright (C) 2013 lrq3000 | |
| # Excerpt from SnakeFood to recursively list all imports of modules using AST parsing | |
| # Additions to print the versions of each module if available |
| from textblob.classifiers import NaiveBayesClassifier | |
| from textblob import TextBlob | |
| train = [ | |
| ('I love this sandwich.', 'pos'), | |
| ('This is an amazing place!', 'pos'), | |
| ('I feel very good about these beers.', 'pos'), | |
| ('This is my best work.', 'pos'), | |
| ("What an awesome view", 'pos'), | |
| ('I do not like this restaurant', 'neg'), |
| """ | |
| A perl Data.Dumper clone for Python | |
| Author: simon@log4think.com | |
| 2011-07-08 | |
| """ | |
| #!/bin/env python | |
| import sys | |
| from types import * |
| Name: mcrouter | |
| Version: 1.0.0 | |
| Release: 1%{?dist} | |
| License: BSD | |
| URL: https://github.com/facebook/mcrouter | |
| BuildRoot: %{_tmppath}/%{name}-%{version}-root | |
| BuildRequires: glibc-devel m4 autoconf gcc gcc-c++ openssl-devel | |
| BuildRequires: gflags-devel glog-devel | |
| Source0: https://github.com/facebook/mcrouter/archive/master.tar.gz | |
| Summary: Memcached protocol router for scaling memcached deployments |