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 | |
# | |
# Upload files to a named filebin installation | |
# (https://github.com/espebra/filebin) | |
# | |
# Usage: | |
# Set the correct environments variables below and run. | |
# | |
# Author: billerby@gmail.com |
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 | |
result=$(curl -sS http://holfuy.com/clientraw/s155/clientraw.txt) | |
set -f | |
variables=(${result//:/ }) | |
current_wind_knots=${variables[1]} | |
gust_knots=${variables[2]} |
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
--select * from alf_qname where local_name in ('currentVersion', 'installedVersion'); | |
--SELECT node_id, qname_id, locale_id, string_value FROM alf_node_properties WHERE qname_id IN (160, 161) ORDER BY node_id; | |
--SELECT node_id, qname_id, locale_id, string_value FROM alf_node_properties WHERE node_id IN (920075) ; | |
UPDATE alf_node_properties SET string_value = '3.10.3' WHERE node_id = 920075 AND qname_id IN (161); | |
(https://community.alfresco.com/thread/148962-best-way-to-uninstall-a-amp-module) |
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
# Powershell script to find processes that got stuck spawned by Alfresco Transformation Server and kill them.# # Get list of processes matching the name and older than x minutes where the cpu load is less than 1.50 (indicates its idle).# WINWORD idle process | |
$orphanProcs = get-process | where {($_.Name -eq "winword") -and ($_.StartTime -lt (get-date).addseconds(20))-and ($_.cpu -lt 1.50)} | |
#Check if list is Null and if not kill them all: | |
If ($orphanProcs) { | |
#display list | |
$orphanProcs | |
#kill list | |
$orphanProcs | foreach { $_.Kill() } | |
} Else { | |
echo "no processes found older than specified" |
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
Get-Process winword | Where { $_.StartTime -lt (Get-Date).AddMinutes(-10) } | Stop-Process -Force |
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() { | |
if (Alfresco.DocumentList) | |
{ | |
YAHOO.Bubbling.fire("registerRenderer", | |
{ | |
propertyName: "type", | |
renderer: function(record, label) | |
{ | |
var key = 'type.' + record.jsNode.type.replace(":", "_"); | |
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 | |
for file in $(find . -name "*nb_NO.properties*") | |
do | |
cp $file `echo $file | sed s/_nb_NO.properties$/_no.properties/` | |
done |
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
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html | |
wget http://download.oracle.com/otn-pub/java/jdk/7u21-b11/jdk-7u21-linux-x64.rpm?AuthParam=1366191299_077cdb0b196500e0d7250707139c1cf7 | |
# Rename the file downloaded, just to be nice | |
mv jdk-7u21-linux-x64.rpm\?AuthParam\=1366191299_077cdb0b196500e0d7250707139c1cf7 jdk-7u21-linux-x64.rpm | |
# Install Java | |
sudo rpm -i jdk-7u21-linux-x64.rpm | |
# Check if the default java version is set to sun jdk |
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/sh | |
du -k --max-depth=1 | sort -nr | awk ' | |
BEGIN { | |
split("KB,MB,GB,TB", Units, ","); | |
} | |
{ | |
u = 1; | |
while ($1 >= 1024) { | |
$1 = $1 / 1024; | |
u += 1 |
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
# Script that traverses a directory and strips all content from files larger than | |
# $filesizelimit This comes handy when we need to transfer a backuped directory | |
# structure to our local environment. We are normally not interested in the content | |
# of the files when debugging. | |
# Version 0.1, | |
# By Erik Billerby, billerby[-at-]acando.com | |
# Location where 7-Zip is installed on your computer. | |
# The default is in a folder, '7-Zip' in your Program Files directory. |