ffmpeg -live_start_index -99999 -i 'https://….m3u8' -c copy something.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
session_start(); | |
function login($username, $password) { | |
if($password == '53cr3t') { | |
return array('username' => $username); | |
} else { | |
return null; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PYTHON = python | |
APPENGINE = /usr/local/google_appengine | |
APPCFG = $(PYTHON) $(APPENGINE)/appcfg.py | |
APP_ID = (YOUR-APP-ID) | |
EMAIL = (YOUR-EMAIL) | |
SERVE_PORT = 8080 | |
ADMIN_PORT = 8000 | |
SERVE_ADDRESS = 0.0.0.0 | |
DATASTORE_PATH = ./datastore.sqlite3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dateutil import tz | |
from jinja2 import Undefined | |
client_timezone = tz.gettz('PST8PDT') # timezone to translate to | |
@app.template_filter() | |
def dateformat(value, format=None, rebase=True): | |
if value is None or isinstance(value, Undefined): | |
return '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Copyright, license and disclaimer are at the end of this file. | |
# This is the latest, enhanced version of the asizeof.py recipes at | |
# <http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/546530> | |
# <http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/544288> | |
'''This module exposes 10 functions and 2 classes to obtain lengths | |
and sizes of Python objects (for Python 2.2 or later [1]). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import requests | |
import json | |
import re | |
import urlparse | |
import unicodedata | |
URL = 'https://api.calm.com/programs/sections' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ~/workspace | |
# Upgrade pip | |
wget https://bootstrap.pypa.io/get-pip.py | |
sudo -H python get-pip.py | |
sudo -H python3 get-pip.py | |
# Install python packages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
extract usage stats | |
requirements: | |
- peewee | |
- requests | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
node.js request forwarder | |
Usage: | |
const express = require('express'); | |
const passthrough = require('./passthrough'); | |
const app = express(); | |
app.enable('trust proxy'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'), | |
path = require('path'), | |
{ promisify } = require('util'), | |
readFileAsync = promisify(fs.readFile), | |
writeFileAsync = promisify(fs.writeFile), | |
inPath = path.join(__dirname, 'bookmarks.html'), | |
outPath = path.join(__dirname, 'bookmarks.json'), | |
linkRx = /<A([^>]+)>([^<]+)<\/A>/ig; | |