You don't want to pay for an iLO subscription but still want to be warned if one of your RAID drive was to fail, this script is made for you!
- Python 3
- SSACLI (from Windows Server Service Pack)
python3 check-drives.py
<?php | |
require_once('wp-load.php'); | |
require_once('wp-content/plugins/sitepress-multilingual-cms/inc/wpml-private-actions-tm.php'); | |
use WPML\TM\AutomaticTranslation\Actions\Actions; | |
define( 'WP_DEBUG', true ); | |
error_reporting(E_ALL); |
#!/bin/bash | |
# Fix emails with bad timestamps in a maildir | |
# This script reads the date from the email header and set its UNIX timestamp and renames it with the proper date | |
# e.g. this: | |
# dec. 05 2017 1512499812.M908995P21566.ip-111-11-11-11,S=16331,W=16746:2,S | |
# becomes that (the email Date header is "Date: Tue, 22 Oct 2013 10:07:21 +0100"): | |
# oct. 22 2013 1382432841.M908995P21566.ip-111-11-11-11,S=16331,W=16746:2,S | |
cd "/var/mail/[email protected]/MyMailDir/cur"; |
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <vlc/vlc.h> | |
#include <signal.h> | |
#include <dirent.h> | |
#include <string.h> | |
#include <X11/Xlib.h> | |
#include <glib.h> |
# Create the CA key | |
openssl genrsa -out ca.key 4096 | |
# Create the CA cert | |
openssl req -new -x509 -days 1826 -key ca.key -out ca.crt | |
# Create the certif key | |
openssl genrsa -out ia.key 4096 | |
# Create the certification request | |
openssl req -new -key ia.key -out ia.csr | |
# Create the final certificate | |
openssl x509 -req -days 730 -in ia.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out ia.crt |
<?php | |
class ThinController | |
{ | |
public function editAction(Request $request, $_template) | |
{ | |
$id = $request->attributes->get('id'); | |
$form = $this->get('model.form_handler')->createForm($id); | |
return $this->render($_template, array('form' => $form)); |
// token: An apple token | |
// message: The message to push | |
// id: The push message identifier | |
// expiry: Push expiration date | |
// priority: Priority (5 or 10) | |
public function createPayload($token, $message, $identifier, $expiry, $priority) | |
{ | |
$body = json_encode(array('aps' => array('alert' => $message)), JSON_UNESCAPED_UNICODE); | |
$packedToken = pack("H*", $token); |
// Sorts the groups. | |
function compareGroups(leftKey, rightKey) { | |
return leftKey.toString().charAt(0).charCodeAt(0) - rightKey.toString().charAt(0).charCodeAt(0); | |
} | |
// Returns the group key that an item belongs to. | |
function getGroupKey(dataItem) { | |
return dataItem.label.toString().charAt(0); | |
} |