Skip to content

Instantly share code, notes, and snippets.

View omadjoudj's full-sized avatar

Othman Madjoudj (aka Athmane) omadjoudj

View GitHub Profile
@omadjoudj
omadjoudj / gist:3890363
Created October 15, 2012 01:19
Add nagios check for Cgit on pkgs01
diff --git a/modules/nagios/files/nagios/services/websites.cfg b/modules/nagios/files/nagios/services/websites.cfg
index 4aaa5cd..69b78a8 100644
--- a/modules/nagios/files/nagios/services/websites.cfg
+++ b/modules/nagios/files/nagios/services/websites.cfg
@@ -187,3 +187,10 @@ define service {
check_command check_website!status-fedora2.rhcloud.com!/index.html!All systems go
use websitetemplate
}
+
+define service {
@omadjoudj
omadjoudj / gist:5592191
Last active December 17, 2015 10:09
econe-run-instances ami-00000004
econe-run-instances: #<REXML::ParseException: Missing end tag for 'EC2-VNET-ID' (got "Message")
Line:
Position:
Last 80 unconsumed characters:
</Error></Errors></Response>>
/usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:330:in `pull'
/usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:22:in `parse'
/usr/lib/ruby/1.8/rexml/document.rb:240:in `build'
/usr/lib/ruby/1.8/rexml/document.rb:43:in `initialize'
/usr/lib/ruby/gems/1.8/gems/amazon-ec2-0.9.17/lib/AWS.rb:344:in `new'
NAME = ci-<%= erb_vm_info[:img_id] %>
#Adjust Capacity for this instance type
CPU = 1
MEMORY = 2048
# Put here specific OS configurations for the cloud hypervisors
#OS = [ kernel = /vmlinuz,
# initrd = /initrd.img,
# root = sda1,
@omadjoudj
omadjoudj / sandboxed-firefox
Created August 8, 2013 04:14
Configure and run firefox inside SELinux sandbox with the previous profile
sudo yum install policycoreutils-sandbox
sudo semodule -e sandbox
sandbox -t sandbox_web_t -X -i ~/.mozilla/ -i ~/.gtkrc-2.0 firefox
@omadjoudj
omadjoudj / gist:7860835
Created December 8, 2013 17:44
.ssh/config
Host *.iternal-boxes-domain
IdentityFile __PATH__
User root
ProxyCommand ssh -W %h:%p root@gateway-box
@omadjoudj
omadjoudj / gist:9368389
Created March 5, 2014 14:38
mod_security make test-regression
Loaded 12 tests from /home/am/workspace/ModSecurity/tests/regression/config/10-debug-directives.t
1) config - SecDebugLog (pos): passed
2) config - SecDebugLog (neg): passed
3) config - SecDebugLogLevel 0: passed
response status failed to match: (?^:^403$)
4) config - SecDebugLogLevel 1: failed
response status failed to match: (?^:^200$)
5) config - SecDebugLogLevel 2: failed
response status failed to match: (?^:^403$)
6) config - SecDebugLogLevel 3: failed
@omadjoudj
omadjoudj / hydra-RHBZ-1225334
Created June 24, 2015 21:01
hydra RHBZ #1225334
==19321== 37 bytes in 15 blocks are definitely lost in loss record 10 of 21
==19321== at 0x4A06C0F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==19321== by 0x116DF8: hydra_restore_read (in /home/athmane/thc-hydra/hydra)
==19321== by 0x10E73E: main (in /home/athmane/thc-hydra/hydra)
==19321==
==19321== 75 bytes in 15 blocks are definitely lost in loss record 11 of 21
==19321== at 0x4A06C0F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==19321== by 0x116F13: hydra_restore_read (in /home/athmane/thc-hydra/hydra)
==19321== by 0x10E73E: main (in /home/athmane/thc-hydra/hydra)
==19321==
@omadjoudj
omadjoudj / ns-inet.sh
Created April 15, 2016 16:11 — forked from dpino/ns-inet.sh
Setup a network namespace with Internet access
#!/usr/bin/env bash
set -x
NS="ns1"
VETH="veth1"
VPEER="vpeer1"
VETH_ADDR="10.200.1.1"
VPEER_ADDR="10.200.1.2"
@omadjoudj
omadjoudj / .tmux.conf
Last active December 22, 2018 20:46
.tmux.conf
set -g default-terminal "screen-256color"
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a last-window
bind-key a send-prefix
set -g history-limit 100000
set-window-option -g allow-rename off
# split panes using | and -
@omadjoudj
omadjoudj / pfox
Last active November 16, 2019 17:20
pfox
#!/bin/sh
TEMP_USER_PROFILE="`mktemp -d /tmp/profile.pfox.tmp.XXXXXXXX`"
#google-chrome-stable \
#--no-first-run \
#--incognito \
#--proxy-server="socks5://localhost:1080" \
#--host-resolver-rules="MAP * 0.0.0.0" \
#--user-data-dir=$TEMP_USER_PROFILE \
#https://duckduckgo.com/