Skip to content

Instantly share code, notes, and snippets.

View r15ch13's full-sized avatar
👷‍♂️

Richard Kuhnt r15ch13

👷‍♂️
View GitHub Profile
@r15ch13
r15ch13 / update-pushbullet.php
Last active August 29, 2015 14:08
Push a list with available linux updates to your Pusbullet Devices
<?php
$accessToken = "ACCESS TOKEN";
$title = "NIFTY TITLE";
$updatesText = exec("aptitude -F'%p - %V > %v' --disable-columns search '~U'", $updatesList);
if(count($updatesList) == 0) {
exit("No updates available.");
} else {
echo $updatesText;
#!/bin/bash
wget "https://plex.tv/downloads?channel=plexpass" -O - | grep -o "http.*plexmediaserver_.*-.*amd64\.deb" | wget -i - -O ./plexmediaserver_update_amd64.deb
dpkg -i ./plexmediaserver_update_amd64.deb
#!/bin/bash
# apt-get install python-crypto python-imaging python-openssl python-pycurl gocr python-django openssl unrar rhino tesseract-ocr tesseract-ocr-deu tesseract-ocr-deu-frak tesseract-ocr-eng
wget "http://get.pyload.org/get/ubuntu-cli/" -O ./pyload-cli-update-all.deb
dpkg -i ./pyload-cli-update-all.deb
@r15ch13
r15ch13 / minecraft-bukki.sh
Created January 11, 2015 00:17
init.d script for bukkit
#!/bin/bash
# /etc/init.d/minecraft
# version 0.3.6 2011-10-17 (YYYY-MM-DD)
### BEGIN INIT INFO
# Provides: minecraft
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
using System;
using System.Text.RegularExpressions;
namespace YourNamespace
{
public static class StringExtensions
{
public static string Capitalize(this String s)
{
if (!String.IsNullOrEmpty(s))
@r15ch13
r15ch13 / config.yml
Created September 21, 2015 16:58
shanaproject + flexget + plex
# set the folder format in your shanaproject.com settings to: {title} ({year})
templates:
global:
magnets: no
thetvdb_lookup: yes
transmission:
enabled: yes
host: 127.0.0.1
@r15ch13
r15ch13 / Bcrypt.php
Created June 26, 2012 18:33
Simple PHP 5.3+ Bcrypt class and functions
<?php
/*
By Marco Arment <me@marco.org>.
This code is released in the public domain.
THERE IS ABSOLUTELY NO WARRANTY.
Usage example:
// In a registration or password-change form:
@r15ch13
r15ch13 / transmission-daemon.sh
Created September 6, 2012 20:10
Transmission Startscript
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: transmission-daemon
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start or stop the transmission-daemon.
### END INIT INFO
@r15ch13
r15ch13 / snippet.xml
Created September 28, 2012 09:46 — forked from JeffreyWay/snippet.xml
Laravel Resource - Sublime Text 2 Snippet
<snippet>
<content><![CDATA[
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');
@r15ch13
r15ch13 / gist:4059596
Last active October 12, 2015 17:08
Saferpay cURL Issue
<?php
error_reporting(E_ALL);
ini_set("display_errors", "on");
$url = "https://www.saferpay.com/user/FileImport/ScriptUpload.aspx";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);