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
RENAME TABLE lookup TO lookups; | |
ALTER TABLE lookups DROP COLUMN section_id; | |
CREATE TABLE `changes` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`username` varchar(25) NOT NULL, | |
`type` enum('routine','fix','new','severe') NOT NULL, | |
`reason` text NOT NULL, | |
`duration` int(11) NOT NULL, | |
`impact` enum('high','low') NOT NULL, |
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
$headers = http.listResponseHeaderNames(); | |
# If we find the "WWW-Authenticate" header, we change site to HTTPS | |
if (array.contains($headers, "WWW-Authenticate")) { | |
$server = http.getHostHeader(); | |
http.changeSite("https://".$server); | |
} | |
|
This file has been truncated, but you can view the full 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
<?xml version="1.0" ?> | |
<!-- | |
Copyright (c) 2005-2012 Zeus Technology. All rights reserved. | |
--> | |
<definitions name="VirtualServer" | |
targetNamespace="http://soap.zeus.com/zxtm/1.0/" | |
xmlns:zeusns="http://soap.zeus.com/zxtm/1.0/" |
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
function zeroCells() { | |
var ss=SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet=ss.getSheets()[0]; | |
var selection=sheet.getDataRange(); | |
var columns=selection.getNumColumns(); | |
var rows=selection.getNumRows(); | |
for (var column=1; column < columns; column++) { | |
for (var row=1; row < rows; row++) { | |
var cell=selection.getCell(row,column); | |
if (cell.isBlank()) { |
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: | |
# Add entries to trello directly from hubot | |
# | |
# Dependencies: | |
# "node-trello": "0.1.2" | |
# | |
# Configuration: | |
# HUBOT_TRELLO_KEY - your trello developer key | |
# | |
# Commands: |
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
/* | |
* With relative atime, only update atime if the previous atime is | |
* earlier than either the ctime or mtime or if at least a day has | |
* passed since the last atime update. | |
*/ | |
static int relatime_need_update(struct vfsmount *mnt, struct inode *inode, | |
struct timespec now) | |
{ | |
if (!(mnt->mnt_flags & MNT_RELATIME)) |
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
find . -type f -print0 | xargs -0 openssl md5 |
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
require 'google/api_client' | |
# To use this code you you need to create a "service account" that has the rights | |
# to access the appropriate Google APIs you are going to use. | |
# See https://code.google.com/apis/console for info on creating service account | |
# credentials | |
# You need to grant access to your domain for this service account. There is more | |
# useful information and examples in other languages at | |
# https://developers.google.com/drive/delegation |
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
Facter.add("certificate_expiry") do | |
setcode do | |
Puppet::SSL::Host.localhost.certificate.expiration | |
end | |
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/bash | |
read -a kernels_installed <<< `dpkg -l 'linux-image-[0-9]*' | grep ^ii | awk '{ print $2 }'` | |
kernel_links=(/vmlinuz /vmlinuz.old) | |
kernels_to_keep=( ) | |
DEBUG=0 | |
for i in ${kernel_links[@]}; do | |
if [ $DEBUG -eq 1 ]; then echo "Checking $i"; fi | |
real_kernel_link=`readlink $i` | |
if [ $DEBUG -eq 1 ]; then echo "$i points to /$real_kernel_link"; fi |