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 | |
# | |
# Post-install script for a Linux Centos Server | |
# | |
# N.B.: tested on Centos 6.3 | |
################################################################################################### | |
_()(set -o pipefail;"$@" 2>&1>&3|sed $'s,.*,\e[31m&\e[m,'>&2)3>&1 # point out errors prefix | |
err()(echo -e "\e[31m$1\e[m" 1>&2) # point out errors function | |
IP="`/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{print $1}'`"; # current first network interface IP address |
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/perl | |
# | |
# Download a comics strip | |
use strict; | |
use warnings; | |
use CGI qw(:all); | |
use LWP::UserAgent; | |
use File::Type; |
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 | |
# $Id: fulldump.sh,v 1.4 2013/10/31 14:25:36 postgres Exp postgres $ | |
# $Source: /var/lib/postgresql/8.2/RCS/fulldump.sh,v $ | |
# $Log: fulldump.sh,v $ | |
# | |
# Revision 1.4 2013/10/31 14:25:36 postgres | |
# Removed pg_dump '-D' option, added $RETVAL | |
# default value for the initial case - MS. | |
# | |
# Revision 1.3 2007/09/28 13:29:07 postgres |
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
system(...); | |
if ($? == -1) { | |
print "failed to execute: $!\n"; | |
} | |
elsif ($? & 127) { | |
printf "child died with signal %d, %s coredump\n", | |
($? & 127), ($? & 128) ? 'with' : 'without'; | |
} | |
else { | |
printf "child exited with value %d\n", $? >> 8; |
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
<?php | |
# | |
# i18next | |
# | |
# This script can be used to auto-translate missing keys when using | |
# "sendMissing: true" option in i18next. | |
# It should be placed - renamed as "index.php" - inside each of locales | |
# subdirs (say: 'locales/it/index.php', 'locales/es/index.php', ...). | |
# A sample of i18n config options could be: |