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/bash | |
. /lib/lsb/init-functions | |
pidofproc "$@" &>> /dev/null | |
retval=$? | |
# Ignore cases such as retval=3 (Pid file doesn't exist) | |
if [ $retval -ne 1 ] |
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/bash | |
# I know it's a bit stupid and there's better ways to do it. But who doesn't like playing. | |
# Written for an old CentOS 4 server where people have installed Perl modules any old how. | |
# Is there a way to merge the two matches together? | |
find /usr/*/perl5 | ruby -ne '/^(\/\w+){4}\/.*\.pm/.match($_) && puts( /^(\/\w+){4}\/[\.\d]*\/{0,1}(.*)/.match($_)[2] )' |
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 | |
# | |
# gpsnmpd: Provides the Greenplum SNMP as a sub-agent | |
# | |
# chkconfig: 35 99 01 | |
# description: gpsnmpd is the GP Software agent for SNMP | |
# | |
# | |
# Sanity checks. |
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 | |
### BEGIN INIT INFO | |
# Provides: statsd | |
# Required-Start: $network $local_fs | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
### END INIT INFO | |
# Do NOT "set -e" |
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/bash | |
# | |
# Init file for Tomcat 7 server | |
# | |
# chkconfig: 2345 80 20 | |
# description: Tomcat 7 server | |
# | |
# Source function library. | |
. /etc/init.d/functions |
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
#include <sys/types.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
int main ( int argc, char *argv[] ) | |
{ | |
pid_t p; | |
pid_t pp; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/statvfs.h> | |
int main(int argc, char **argv) | |
{ | |
struct statvfs _statvfs; | |
if ( argc != 2 ) |
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
/* | |
Program to allocate MB of memory. Can chose between calloc and malloc implementations. | |
Author: nic doye http://worldofnic.org | |
Date: 2011.03.31 | |
Last update: 2012.10.16 | |
*/ | |
#include <stdlib.h> |
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 groovy | |
new File( args[0] ).eachLine{ it -> println it.count(',') } |
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 ruby | |
require 'csv' | |
CSV.foreach(ARGV[0],'r') {|row| puts row.size} |
OlderNewer