Time
http://www.ruby-doc.org/core-2.0.0/Time.html
require 'time'
Time.parse
#!/bin/bash | |
# | |
# This removes lines containing passwordAsUTF8String in /var/log/secure.log* | |
templog=`mktemp -t securelog` | |
for logfile in /var/log/secure.log*; do | |
echo "Filtering passwords from $logfile" | |
if [ ${logfile##*.} == "bz2" ]; then |
#!/usr/bin/env ruby | |
require 'pdf-reader' | |
infile=ARGV[0] | |
outfile=ARGV[1] | |
reader = PDF::Reader.new(infile) | |
text = "" | |
reader.pages.each do |page| |
#!/bin/bash | |
# ssh-multi | |
# D.Kovalov | |
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
# a script to ssh multiple servers over multiple tmux panes | |
starttmux() { | |
if [ -z "$HOSTS" ]; then |
#!/bin/bash | |
DEBIAN_HOSTS="server1 server2 server3"; | |
LOG_FILE="server-update-`date +%Y%m%d%H%M%S`.log" | |
requires_reboot=""; | |
function execute_command() | |
{ | |
command="$1"; |
######################################################################################## | |
### Fish Custom Overrides | |
### Creates a shell prompt in the form of: | |
### | |
### ----------------------------------------------------------------------- 11:56:05 | |
### kevin@kross /S/L/F/C/V/A/F/L/V/A/Support > | |
######################################################################################## | |
set --global fish_prompt_username_color 555555 |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.company.xprotect_re-enable_adobe_flash</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>sh</string> | |
<string>/Library/Scripts/xprotect_re-enable_adobe_flash.sh</string> |
Time
http://www.ruby-doc.org/core-2.0.0/Time.html
require 'time'
Time.parse
http://dev.mysql.com/doc/refman/5.5/en/datetime.html
MySQL converts TIMESTAMP values from the current time zone to UTC for storage, and back from UTC to the current time zone for retrieval.
By default, the current time zone for each connection is the server's time. The time zone can be set on a per-connection basis. As long as the time zone setting remains constant, you get back the same value you store. If you store a TIMESTAMP value, and then change the time zone and retrieve the value, the retrieved value is different from the value you stored. This occurs because the same time zone was not used for conversion in both directions. The current time zone is available as the value of the time_zone system variable. For more information, see Section 10.6, “MySQL Server Time Zone Support”.
http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_time_zone
http://www.lindstromhenrik.com/language-detection-using-elasticsearch/
For use in Sense:
GET /langdect
{
"settings" : {
"analysis" : {
"analyzer" : {
#!/bin/bash | |
# AccountRenamer.command | |
# | |
# Interactive tool to rename an account from one name to another (like when a teacher gets renamed and their e account changes) | |
# | |
# HISTORY: | |
# | |
# 1.0 2013-03-25 bmp - initial release |