Skip to content

Instantly share code, notes, and snippets.

View casparjones's full-sized avatar
😅
spring cleaning my github profile

Frank Vlatten casparjones

😅
spring cleaning my github profile
View GitHub Profile
@casparjones
casparjones / -ex.bashrc
Created October 3, 2017 13:25
extract all archives
alias -- -ex=extract_archive
## extract files
extract_archive () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjfv $1 ;;
*.tar.gz) tar xzfv $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
@casparjones
casparjones / .bashrc
Created October 10, 2016 09:59
Function for extract all compressed files on bash with -ex <filename> Add the Method in your .bashrc
alias -- -ex=extract_archive
## extract files
extract_archive () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjfv $1 ;;
*.tar.gz) tar xzfv $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
@casparjones
casparjones / install_taiga_uberspace.md
Last active April 9, 2016 07:24 — forked from shuairan/install_taiga_uberspace.md
Taiga.io Backend und Frontend auf Uberspace installieren
#!/bin/bash
# Usage: Make a symbolic link to this script and call then.
# get current script path
SCRIPTPATH="$(test -L "$0" && readlink "$0" || echo "$0")"
SCRIPTREALPATH="`readlink -f ${SCRIPTPATH}`"
# if readlink dosnt work
if [ ! -d $SCRIPTREALPATH ] ; then
SCRIPTREALPATH="$(dirname $SCRIPTPATH)"
@casparjones
casparjones / daemon.php
Last active December 14, 2015 08:29
simple php daemon
<?php
if($argv[1] == '-d') {
echo "start daemon\n";
while(true) {
if(file_exists('message.txt')) {
$oMessage = json_decode(file_get_contents('message.txt'));
if($oMessage->action == 'sayHello') {
echo "Hello...\n";
}
@casparjones
casparjones / svn-backup
Created November 22, 2012 10:22
svn-backup
#!/usr/bin/env ruby
require 'rubygems'
require 'xmlsimple'
require 'date'
require 'fileutils'
require "pp"
time = Time.new
CURRENTDIR=Dir.getwd
ownpid=$$
@casparjones
casparjones / sport_de
Created June 4, 2012 08:51
sport.de feed
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<title><![CDATA[sport.de Top-News]]></title>
<link>http://www.sport.de/feed/579/telegramm.xml</link>
<description><![CDATA[Alle Top-News zu Fußball, Formel 1, Boxen, Handball, Basketball, Eishockey, Motorsport, Radsport, Tennis, Leichtathletik, Golf und Wintersport sowie den großen Sport-Events wie Welt- und Europameisterschaften und Olympischen Spielen.]]></description>
<pubDate>Mon, 04 Jun 2012 08:51:02 +0000</pubDate>
<lastBuildDate>Mon, 04 Jun 2012 08:51:02 +0000</lastBuildDate>
<copyright>2010 RTL interactive GmbH</copyright>
<?php
ini_set('display_errors', 1);
error_reporting (E_ALL);
class MyObject {
public $points;
protected $_points;