Skip to content

Instantly share code, notes, and snippets.

View menached's full-sized avatar

David Menache menached

View GitHub Profile
@mnebuerquo
mnebuerquo / kill-idle-vnc.sh
Created June 24, 2016 11:46
place in /etc/cron.hourly and it will kill any idle vnc sessions
#!/bin/bash
# http://serverfault.com/a/767361/33170
displays=`ps aux | grep Xvnc | grep -v 'grep\|sed' | sed -r 's|.*(Xvnc :[0-9]*).*|\1|' | cut -d' ' -f 2`
limit=30
date
echo "Checking for inactive sessions!"
while read -r d; do
@menached
menached / index.php
Last active August 29, 2015 14:21 — forked from Skalman/index.php
<?php
if (!isset($_GET['url'])) {
?>
<!DOCTYPE html>
<meta charset="utf-8">
<title>Youtube RSS creator</title>
<form>
<p>Create an RSS feed for the videos on the following page:
<p><input name="url" placeholder="E.g. https://www.youtube.com/user/scishow/videos" style="width: 30em">

Chef Bootstrapper For SuSE/SLES

Installation

Note: Run this script as the root user (no sudo calls are used in the script).

You will need the curl package installed, though I would have no idea why it wouldn't be installed by default:

zypper --non-interactive install curl

@tankchintan
tankchintan / gist:1335220
Last active November 30, 2019 00:17
Procedure for installing and setting Sun JDK Java on Default Amazon Linux AMI
# First verify the version of Java being used is not SunJSK.
java -version
# 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/7u1-b08/jdk-7u1-linux-i586.rpm
# Rename the file downloaded, just to be nice
mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm
# Install Java
<!DOCTYPE html>
<html>
<head prefix="og: http://ogp.me/ns# og_recipebox: http://ogp.me/ns/apps/example#">
<meta property="fb:app_id" content="YOUR_APP_ID" />
<meta property="og:url" content="http://example.vom/cookie.html">
<meta property="og:type" content="example:recipe" />
<meta property="og:title" content="Oreo Stuffed Cookies" />
<meta property="og:image" content="http://example.com/cookie.jpg" />
<meta property="og:description" content="The Turducken of Cookies" />
@menached
menached / fetch_user_cdrs.sh
Last active September 27, 2015 05:48 — forked from andyfowler/nutshell-post-api-example.html
See pbx.doap.com:/usr/sbin syntax: $ ./fetch_user_cdrs.sh username
#/bin/sh
#daves shiny new script
#/usr/sbin/fetch_user_cdrs.sh
echo "Fetch my call records from the database"
@fnichol
fnichol / README.md
Created March 30, 2011 21:17
Chef Bootstrapper For SuSE/SLES

Chef Bootstrapper For SuSE/SLES

Installation

Note: Run this script as the root user (no sudo calls are used in the script).

You will need the curl package installed, though I would have no idea why it wouldn't be installed by default:

zypper --non-interactive install curl