This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class Memory { | |
private static Runtime runtime = Runtime.getRuntime(); | |
private static int mb = 1024*1024; | |
public static long getFree() { | |
return runtime.freeMemory() / mb; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nl.techop.AccountControl.utils | |
/** | |
* @author arnobroekhof | |
* | |
*/ | |
class FileContentUtils { | |
/** | |
* Return the content of the given file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log4j.rootLogger=WARN, syslog | |
log4j.appender.syslog=org.apache.log4j.net.SyslogAppender | |
log4j.appender.syslog.facility=LOCAL0 | |
log4j.appender.syslog.layout.ConversionPattern=%-5p [%t] [%c]: %m%n | |
log4j.appender.syslog.layout=org.apache.log4j.PatternLayout | |
log4j.appender.syslog.SyslogHost=my.syslog.server.fqdn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# description "start and stop the bamboo-agent" | |
# | |
start on runlevel [2345] | |
stop on runlevel [^2345] | |
console log | |
chdir /opt/bamboo | |
setuid bamboo | |
setgid bamboo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub PasswordBreaker() | |
'Breaks worksheet password protection. | |
Dim i As Integer, j As Integer, k As Integer | |
Dim l As Integer, m As Integer, n As Integer | |
Dim i1 As Integer, i2 As Integer, i3 As Integer | |
Dim i4 As Integer, i5 As Integer, i6 As Integer | |
On Error Resume Next | |
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 | |
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 | |
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import ldap | |
import os, sys | |
import ConfigParser | |
import logging | |
config_file = '/etc/sysconfig/ssh-ldap' | |
def parse_config(config_file): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.datastax.driver.core.*; | |
import com.datastax.driver.core.querybuilder.QueryBuilder; | |
import org.apache.cassandra.exceptions.ConfigurationException; | |
import org.apache.thrift.transport.TTransportException; | |
import org.cassandraunit.utils.EmbeddedCassandraServerHelper; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Test; | |
import java.io.IOException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if($is_signed_in && $permissionChecker.isCommunityAdmin($group_id)) | |
#dockbar() | |
#end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/usr/bin/ftp -iv centos << EOF 2> ftp.error | |
binary | |
put testfile | |
quit | |
EOF | |
test -s ftp.error && echo "FTP failed" && exit 1 || rm -f ftp.error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$real_extract_command = $extract_command ? { | |
'' => $source_filetype ? { | |
'.tgz' => 'tar -zxf', | |
'.tar.gz' => 'tar -zxf', | |
'.gz' => 'tar -zxf', | |
'.tar.bz2' => 'tar -jxf', | |
'.tar' => 'tar -xf', | |
'.zip' => 'unzip', | |
}, |
OlderNewer