Skip to content

Instantly share code, notes, and snippets.

@dotsent
dotsent / twitch-recorder.py
Created May 3, 2019 13:16 — forked from junian/twitch-recorder.py
Record Twitch Streams Automatically in Python
# This code is based on tutorial by slicktechies modified as needed to use oauth token from Twitch.
# You can read more details at: https://www.junian.net/2017/01/how-to-record-twitch-streams.html
# original code is from https://slicktechies.com/how-to-watchrecord-twitch-streams-using-livestreamer/
import requests
import os
import time
import json
import sys
import subprocess
#!/bin/bash
[ -n "$1" ] && bash=$(which $1) || bash=$(which bash)
echo -e "\033[95mTesting $bash ..."
echo $($bash --version | head -n 1)
echo -e "\033[39m"
r=`env x="() { :; }; echo x" $bash -c "" 2>/dev/null`
#require 'rubygems'
#$: << File.expand_path(File.join(File.dirname(__FILE__), 'jrwin32ole', 'lib'))
#p $:
require 'rubygems'
require 'win32ole'
require 'time' # needed for Time.parse
JRUBY = (RUBY_ENGINE =~ /jruby/i)
require 'jruby-prof' if JRUBY
@dotsent
dotsent / mysql2sqlite.sh
Created June 1, 2012 07:25 — forked from esperlu/mysql2sqlite.sh
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite