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 | |
PNAME="tail" | |
PNAMEFULL="Tail" | |
PPATH="${HOME}" | |
PBIN="tail -f /var/log/dmesg.log" | |
PLOG="${PPATH}/${PNAME}.log" | |
PIDPATH="${PPATH}/${PNAME}.pid" | |
USESCREEN=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
#!/bin/bash | |
###################################################################### | |
# Copyright (c) 2012 Maximilian Ruta <mr@xtain.net> # | |
# # | |
# Permission is hereby granted, free of charge, to any person # | |
# obtaining a copy of this software and associated documentation # | |
# files (the "Software"), to deal in the # Software without # | |
# restriction, including without limitation the rights to use, copy, # | |
# modify, merge, publish, distribute, sublicense, and/or sell # | |
# copies of the Software, and to permit persons to whom the # |
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 | |
if [ ${#} -eq 0 ]; then | |
echo "Usage: ${0} URL [filename]" | |
exit | |
fi; | |
URL="${1}" | |
CONTENT=$(curl "${URL}") | |
MEDIAURLS=$(echo "${CONTENT}" | egrep '^[[:space:]]+mediaCollection\.addMediaStream\(0,[[:space:]]*2,[[:space:]]*' | sed -r 's/^[[:space:]]+mediaCollection\.addMediaStream\(0,[[:space:]]*2,[[:space:]]*"(.*)",[[:space:]]*"(.*)"\);/\1\n\2/') | |
MEDIAAPP=$(echo "${MEDIAURLS}" | head -n 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
#!/bin/bash | |
if which lsb_release; then | |
DISTRIB_ID=$(lsb_release -i | sed -n 's/Distributor ID\:\t//p') | |
else | |
echo "You nead to install /etc/lsb-release to run this" | |
fi; | |
SERVER="vpn.xtain.net" | |
DNS="10.8.0.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
#!/bin/bash | |
VERSION=0.0.2 | |
LANG=C | |
HOSTNAME=`uname -n` | |
KERNEL=`uname -r` | |
CPU=`uname -p` | |
CPUS=$(cat /proc/cpuinfo | sed -nr 's/^model name[[:space:]]+:[[:space:]]+(.*)/\1/p') | |
ARCH=`uname -m` | |
DATE=`date` |
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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
/** | |
* StrongTypes (http://github.com/fireflyjs/strongtypesjs) | |
* Copyright 2012, Maximilian Ruta <mr@xtain.net> (http://deltachaos.de/) | |
* | |
* This is a Type System for JavaScript. It is desinged to run | |
* on node.js and in the Browser. Tested with: | |
* • Chromium 15 | |
* • Firefox 8 | |
* • Opera 11.52 | |
* • Internet Explorer 9 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>yt18</title> | |
<style type="text/css"> | |
body { | |
background-color: #abcdef; | |
overflow: hidden; | |
text-decoration: bold; |
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 testCompositeImage() { | |
echo "<h2>compositeImage</h2>"; | |
$this->ImageMagickCanvas = new ImageMagickCanvasLib(400, 500, 'red'); | |
//$this->ImageMagickCanvas->setBackgroundColor('red'); | |
$this->ImageMagickCanvas->ellipse(10, 10, 100, 200); | |
$res = $this->ImageMagickCanvas->newLayer(130, 200, 'yellow'); | |
$res->loadFromFile(dirname(__FILE__).DS.'imagick'.DS.'test.jpg'); |
OlderNewer