Skip to content

Instantly share code, notes, and snippets.

View fieu's full-sized avatar
🏠
Working from home

Sheldon Rupp fieu

🏠
Working from home
View GitHub Profile
#!/usr/bin/env bash
torrentid="$1"
torrentname="$2"
torrentpath="$3"
x=1
ddport=$(grep '"daemon_port": [0-9]*' ~/.config/deluge/core.conf | awk -F ': ' '{print $2}' | awk -F ',' '{print $1}')
host="127.0.0.1"
user="user"
pass="password"
@fieu
fieu / FileDownload.php
Created November 8, 2017 15:07 — forked from rodneyrehm/FileDownload.php
PHP: FileDownload
<?php
class FileDownload
{
public static $_response_status = array(
200 => 'OK',
201 => 'Created',
204 => 'No Content',
206 => 'Partial',
207 => 'Multi-Status', // WTF ??
@fieu
fieu / upload.php
Created November 8, 2017 15:06 — forked from AxlH/upload.php
<?php
/**
* @author Axl Hoogelander
* @copyright 2012
* @description How 2 use the class
*/
include 'uploader.php';
if(isset($_POST['upload'])):
@fieu
fieu / datauri.php
Created November 8, 2017 15:05 — forked from rodneyrehm/datauri.php
PHP: datauri.php - convert image to data-uri
#!/opt/local/bin/php
<?php
/*
1) replace the shebang (first line) with the path to your php binary
(probably something like /usr/bin/php)
2) move the file to /usr/local/bin/datauri.php
(this should be in your PATH)
3) chmod ugo+rx /usr/local/bin/datauri.php
(make the script executable for everyone)
@fieu
fieu / file_types.php
Created November 8, 2017 14:47 — forked from kanazux/file_types.php
arrays file types php
<?php
$compressed = array(
".0" => "Hacha Split Archive File",
".000" => "DoubleSpace Compressed File",
".7z" => "7-Zip Compressed File",
".7z.001" => "7-Zip Split Archive Part 1 File",
".7z.002" => "7-Zip Split Archive Part 2 File",
".a00" => "ALZip Second Split Archive File",
".a01" => "ALZip Third Split Archive File",

Keybase proof

I hereby claim:

  • I am NurdTurd on github.
  • I am nurdturd (https://keybase.io/nurdturd) on keybase.
  • I have a public key whose fingerprint is A626 5397 DBF3 BC7B 2D46 316E 8FE8 C269 1426 2A96

To claim this, I am signing this object:

@fieu
fieu / delete-all-messages.js
Created September 11, 2017 11:15 — forked from niahoo/delete-all-messages.js
Delete all messages in a Discord channel
(function(){
// Paste your token between the quotes :
var authToken = '________________________________________'
// https://github.com/yanatan16/nanoajax
!function(t,e){function n(t){return t&&e.XDomainRequest&&!/MSIE 1/.test(navigator.userAgent)?new XDomainRequest:e.XMLHttpRequest?new XMLHttpRequest:void 0}function o(t,e,n){t[e]=t[e]||n}var r=["responseType","withCredentials","timeout","onprogress"];t.ajax=function(t,a){function s(t,e){return function(){c||(a(void 0===f.status?t:f.status,0===f.status?"Error":f.response||f.responseText||e,f),c=!0)}}var u=t.headers||{},i=t.body,d=t.method||(i?"POST":"GET"),c=!1,f=n(t.cors);f.open(d,t.url,!0);var l=f.onload=s(200);f.onreadystatechange=function(){4===f.readyState&&l()},f.onerror=s(null,"Error"),f.ontimeout=s(null,"Timeout"),f.onabort=s(null,"Abort"),i&&(o(u,"X-Requested-With","XMLHttpRequest"),e.FormData&&i instanceof e.FormData||o(u,"Content-Type","application/x-www-form-urlencoded"));for(var p,m=0,v=r.length;v>m;m++)p=r[m],void 0!==t[p]&&(f[p]=t[p]);for
@fieu
fieu / keybase.md
Created April 23, 2017 11:06
keybase.md

Keybase proof

I hereby claim:

  • I am NurdTurd on github.
  • I am nurdturd (https://keybase.io/nurdturd) on keybase.
  • I have a public key whose fingerprint is 4203 511F DF0E 7F9A 21AD E6BE CF80 06A3 AAF5 2B53

To claim this, I am signing this object:

@fieu
fieu / lunar.go
Created April 14, 2016 20:55 — forked from msmoode/lunar.go
An image/file hosting server written in go - my version of https://gist.github.com/Twister915/d6b5c28753f230fabda3
package main
import (
"github.com/gin-gonic/gin"
_ "github.com/lib/pq"
"github.com/gorilla/context"
"github.com/jinzhu/gorm"
"github.com/spf13/viper"
"time"
"fmt"
#!/usr/bin/env ruby
# Aside from removing Ruby on Rails specific code this is taken verbatim from
# mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome
# - Ryan Florence (http://ryanflorence.com)
#
# Install this hook to a remote repository with a working tree, when you push
# to it, this hook will reset the head so the files are updated
if ENV['GIT_DIR'] == '.'