Skip to content

Instantly share code, notes, and snippets.

View azizshamim's full-sized avatar
:octocat:
talkin' bout GitHub

Aziz Shamim azizshamim

:octocat:
talkin' bout GitHub
View GitHub Profile
# cat snmpd.conf
rouser sysadmin priv
createUser sysadmin MD5 "mypassword1" AES "mypassphrase1"
# snmpwalk -v3 -u sysadmin -l authPriv -a md5 -A mypassword1 -x aes -X mypassphrase1 localhost system.sysDescr.0
snmpwalk: Unsupported security level (Sub-id not found: (top) -> system)
#!/usr/bin/php -q
<?php
# IN PHP
preg_match("/welcome!?/", "welcome is the new welcome!", $matches);
print "In PHP, the regex matches: ".$matches[0]."\n";
?>
$ In PHP, the regex matches: welcome
#!/usr/bin/perl -w
# IN PERL
use strict;
my $string = "welcome is the new welcome!";
$string =~ m/welcome!?/;
print 'In perl, the index of the match is: '.length($`)."\n";
$ In perl, the index of the match is: 0
#!/usr/bin/env ruby
# RUBY
string = "welcome is the new welcome!"
regex = Regexp.new(/welcome!?/)
puts "In ruby the index of the match is: "+string.index(regex).to_s
$ In ruby the index of the match is: 0
/*
* ------------------------------------------------------------
* "THE BEERWARE LICENSE" (Revision 42):
* <author> wrote this code. As long as you retain this
* notice, you can do whatever you want with this stuff. If we
* meet someday, and you think this stuff is worth it, you can
* buy me a beer in return.
* ------------------------------------------------------------
*/
@azizshamim
azizshamim / freenode_ssl_Ca
Created November 3, 2010 20:34
The CA Cert for Freenode
-----BEGIN CERTIFICATE-----
MIIEozCCA4ugAwIBAgIQWrYdrB5NogYUx1U9Pamy3DANBgkqhkiG9w0BAQUFADCB
lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt
SGFyZHdhcmUwHhcNMDgxMDIzMDAwMDAwWhcNMjAwNTMwMTA0ODM4WjBBMQswCQYD
VQQGEwJGUjESMBAGA1UEChMJR0FOREkgU0FTMR4wHAYDVQQDExVHYW5kaSBTdGFu
ZGFyZCBTU0wgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC2VD2l
2w0ieFBqWiOJP5eh1AcaqVgIm6AVwzK2t/HouaVvrTf2bnEbtHUtSF6fxhWqge/l
xIiVijpsd8y1zWXkZ+VzyVBSlMEnST6ga0EWQbaUmUGuPsviBkYJ6U2+yUxVqRh+
@azizshamim
azizshamim / ruby-enterprise.spec
Created November 1, 2011 19:45 — forked from axisofentropy/ruby-enterprise.spec
patched the source for ppc (don't use for other architectures)
# Package Maintainer: Increment phusion_release to match latest release available
%define phusion_release 2011.03
%define _prefix /opt/ree
Summary: Ruby Enterprise Edition (Release %{phusion_release})
Name: ruby-enterprise
Vendor: Phusion.nl <info@phusion.nl>
Packager: Adam Vollrath <hosting@endpoint.com>
Version: 1.8.7
Release: 8%{dist}
License: Ruby or GPL v2
@azizshamim
azizshamim / ree-ppc.patch
Created November 1, 2011 19:55
Patch for ree to help compile on ppc
--- ruby-enterprise-1.8.7-2011.03/source/Makefile.in 2011-02-24 04:09:12.000000000 -0600
+++ ruby-enterprise-1.8.7-2011.03/source/Makefile.in 2011-11-01 14:38:45.000000000 -0500
@@ -178,7 +178,7 @@
rm -f y.tab.c
.c.@OBJEXT@:
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) -Xassembler -mregnames -c $<
.s.@OBJEXT@:
# kern.sysv.shm* settings added by MagLev installation
kern.sysv.shmmax=2147483648
kern.sysv.shmall=524288
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
set -g status-bg green
set -g status-right "%H:%M" # %d-%b-%y
set -g bell-action none
setw -g mode-keys vi
# Prefix key.
set -g prefix C-a
unbind C-b
bind C-a send-prefix
bind " " next-window