Skip to content

Instantly share code, notes, and snippets.

@mmazer
mmazer / gist:5404280
Created April 17, 2013 13:26
MacOS X - using snmpwalk
snmpwalk -v 2c -c public -O e <ip>
@mmazer
mmazer / start.bat
Created April 17, 2013 13:16
Java - Windows batch file wrapper to start apps
@echo off
set TOP=%~dp0..
set LIB=%TOP%\lib
set MAIN=
for /R %LIB% %%a in (*.jar) do call :AddToPath %%a
set CLASSPATH=%CLASSPATH%;%LIB%\classes
@mmazer
mmazer / httpd.conf
Created April 17, 2013 12:59
MacOS X - Enable per user web sharing in 10.8.x
# Create /etc/apache2/users/<username>.conf with this content.
# Note these options enable symbolic links
# Run `sudo apachectl restart` to put changes into effect
<Directory "/Users/<username>/Sites/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
@mmazer
mmazer / words.txt
Created April 17, 2013 12:57
JavaScript - reserved words
// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Reserved_Words
break
case
catch
continue
debugger
default
delete
do
@mmazer
mmazer / pom.xml
Created April 17, 2013 12:55
Maven - Set context root for WTP web apps
<properties>
<m2eclipse.wtp.contextRoot>/ROOT</m2eclipse.wtp.contextRoot>
</properties>
@mmazer
mmazer / racoonctl.sh
Created April 11, 2013 15:01
MacOS X: Control racoon service
#!/bin/sh
case $1 in
'start')
sudo launchctl start com.apple.racoon
;;
'stop')
sudo launchctl stop com.apple.racoon
;;
@mmazer
mmazer / JSP Check null variable.html
Created September 29, 2012 13:58
JSP: Check null variable
<c:if test="${ empty sessionScope.myVar }">
</c:if>
@mmazer
mmazer / IE Rendering.css
Created September 29, 2012 13:50
CSS: Force latest IE rendering engine
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@mmazer
mmazer / IE Conditionals.css
Created September 29, 2012 13:47
CSS: IE Conditionals
<!--[if lt IE 7 ]> <body class="ie6"> <![endif]-->
<!--[if IE 7 ]> <body class="ie7"> <![endif]-->
<!--[if IE 8 ]> <body class="ie8"> <![endif]-->
<!--[if IE 9 ]> <body class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]> for higher than IE9 or non-IE <![endif]-->
@mmazer
mmazer / btn-submit.css
Created September 24, 2012 02:06
CSS: Submit button images
.btn-submit {
background: transparent url(image.png) no-repeat center top;
border: 0;
cursor: pointer;
height: 0px;
margin: 0;
overflow: hidden;
padding: 55px 0 0; /* set top padding to height of image */
width: 100px; /* set to width of image */
}