This file contains hidden or 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
| // http://security.stackexchange.com/a/34552 | |
| #include <stdio.h> | |
| #if defined(__i386__) | |
| static __inline__ unsigned long long rdtsc(void) | |
| { | |
| unsigned long long int x; | |
| __asm__ __volatile__ (".byte 0x0f, 0x31" : "=A" (x)); |
This file contains hidden or 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
| use bareos; | |
| ALTER TABLE Media ADD COLUMN VolParts INTEGER UNSIGNED NOT NULL DEFAULT 0; |
This file contains hidden or 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
| <IfModule passenger_module> | |
| <VirtualHost *:80> | |
| ServerAdmin admin@example.com | |
| ServerName page.example.com | |
| DocumentRoot "/var/www/redmine/public" | |
| PassengerAppRoot /var/www/redmine | |
| RailsEnv 'production' |
This file contains hidden or 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/python | |
| import sys | |
| import re | |
| import subprocess | |
| from zabbix_auth import * | |
| server = 'smtp.example.com' | |
| user = 'user1@example.com' | |
| password = 'AnyP@ssw0rd' |
This file contains hidden or 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
| <!-- /etc/cluster/cluster.conf --> | |
| <?xml version="1.0"?> | |
| <cluster config_version="23" name="pm_cluster01"> | |
| <clusternodes> | |
| <clusternode name="node01" nodeid="1"> | |
| <fence> | |
| <method name="pcmk-redirect"> | |
| <device name="pcmk" port="node01"/> | |
| </method> | |
| </fence> |
This file contains hidden or 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-Module ActiveDirectory | |
| Function Refresh_Group ($groupname, $newmembers) | |
| { | |
| $oldmembers = Get-ADGroupMember -Identity $groupname | |
| $rmmembers = $null | |
| $addmembers = $null | |
| if ($oldmembers -eq $null -and $newmembers -eq $null) { | |
| return |
This file contains hidden or 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
| @echo off | |
| if "x%~1%x" EQU "xx" GOTO USAGE | |
| set date=%1 | |
| setlocal EnableDelayedExpansion | |
| echo Composing the list of updates to remove ... |
This file contains hidden or 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 | |
| dd if=/dev/zero of=blank bs=1024 count=1k | |
| test -f $1.img && rm -f $1.img | |
| touch $1.img | |
| max=`ls ???????? | sort | tail -n1` | |
| for i in `seq 0 $max`; do | |
| fn=`printf "%08d" $i` |
This file contains hidden or 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 | |
| # | |
| # #automysqlcheck.sh | |
| # | |
| # This is a small bash script that checks all mysql databases for errors | |
| # and mails a log file to a specified email address. All variables are | |
| # hardcoded for ease of use with cron. Any databases you wish not to check | |
| # should be added to the DBEXCLUDE list, with a space in between each name. | |
| # | |
| # original version by sbray@csc.uvic.ca, UVic Fine Arts 2004 |
This file contains hidden or 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
| # This command scan new hard disk drives on Linux Systems. | |
| # this is useful when the host is on a Virtual Environment and you add new hard disks to it | |
| ls /sys/class/scsi_host/ | while read host ; do echo "- - -" > /sys/class/scsi_host/$host/scan ; done |