Skip to content

Instantly share code, notes, and snippets.

View random-robbie's full-sized avatar
💭
Hacking!

Robbie random-robbie

💭
Hacking!
View GitHub Profile
@random-robbie
random-robbie / brokenSSL
Created September 29, 2015 07:11
nginx reverse proxy
events {
worker_connections 1024;
}
user www-data;
worker_processes 4;
http {
# Basic Settings
sendfile on;
@random-robbie
random-robbie / build.sh
Created September 30, 2015 12:47
No Iptables
#!/bin/bash
# Note, this script assumes Ubuntu Linux and it will most likely fail on any other distribution.
# bomb on any error
set -e
# change to working directory
root="/opt/netflix-proxy"
@random-robbie
random-robbie / dockerinstall.sh
Last active September 30, 2015 13:45
Install Docker for ubuntu 15
apt-get update
curl -sSL https://get.docker.com/ | sh
update-rc.d docker defaults
service docker start
"videos":[
{
"ss_id":95244,
"sport_name":"",
"tournament_name":"Blitz",
"name":"Blitz",
"description":"Blitz ",
"thumbnail":"http://cdn.dstv.com/supersport.img/videoimages/2014/12/live_stream_lauren_SSBlitz_120x90.jpg",
"image":"http://cdn.dstv.com/supersport.img/videoimages/2014/12/live_stream_lauren_SSBlitz_536x400.jpg",
POST /proxy/channelStream HTTP/1.1
User-Agent: Mozilla/5.0 (Linux; Android 6.0; beIN SPORTS/5.4)
X-AN-WebService-IdentityKey: 2OogXO1e2R7dhS19O0hXeV3Bf8itRt2K
Content-Type: application/x-www-form-urlencoded
Content-Length: 23
Host: proxies-beinmena.portail.alphanetworks.be
Connection: Keep-Alive
Accept-Encoding: gzip
authToken=&idChannel=17
@random-robbie
random-robbie / json2xml.php
Created October 30, 2015 10:26
JSON TO XML via POST request
<?php
$json_post = $_REQUEST['json'];
function json_validate($string)
{
// decode the JSON data
$result = json_decode($string);
// switch and check possible JSON errors
switch (json_last_error()) {
@random-robbie
random-robbie / replace_apt_sources.sh
Created November 10, 2015 15:39 — forked from eculver/replace_apt_sources.sh
Replace default Ubuntu apt repository URLs w/ DigitalOcean's
sudo sed -i "s/archive\.ubuntu/mirrors.digitalocean/g" /etc/apt/sources.list
@random-robbie
random-robbie / nginx.conf
Created November 30, 2015 11:35
Upstart
# nginx
description "nginx http daemon"
author "George Shammas <georgyo@gmail.com>"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/usr/sbin/nginx
env PID=/var/run/nginx.pid
@random-robbie
random-robbie / Bash tweet
Created September 8, 2013 07:14
Tweet From Bash
#! /bin/bash
# tweet
#
# This script sends tweets
# Use:
# tweet "String to be tweeted"
# Special characters may not be used if your string is not delimited by quotes
#
# Author: San Bergmans
@random-robbie
random-robbie / sed.sh
Created March 16, 2016 10:19
Change url in all PHP files
grep -lr --include=*.php "http://example.com" /var/www/example.com/htdocs | xargs sed -i -e 's/http:\/\/example.com/https:\/\/www.example.com/g'