Skip to content

Instantly share code, notes, and snippets.

@drzax
drzax / iptv-to-hls.sh
Created June 1, 2017 05:24
IPTV to HTTP live streaming
#!/bin/bash
while true; do
currTime=`date +%Y%m%d%H%M`
if [ "$currTime" -ge 201507081658 -a "$currTime" -le 201507082300 ]; then
echo "$currTime: Stream should be on. Start ffmpeg if the process does not exist"
if [ "$(pidof ffmpeg)" ]; then
echo "$currTime: ffmpeg already running."
sleep 10
else
@drzax
drzax / .block
Last active December 6, 2023 16:28
Narrative Charts
license: mit
scrolling: true
height: 300
@drzax
drzax / bug.svelte
Created August 29, 2023 01:01
A formatting bug in prettier-plugin-svelte
<div>
<!-- this is duplicated on format -->
<style></style>
</div>
@drzax
drzax / qualify.js
Created September 9, 2015 01:42
Qualify a URL in javascript. That is, convert a relative URL to an absolute URL
function qualifyURL(url) {
var a = document.createElement('a');
a.href = url;
return a.href;
}
@drzax
drzax / readme.md
Last active January 28, 2020 23:26
Quick and dirty twitter scraper.
  1. Get to the page with tweets you want to scrape.
  2. Throw the content of scrape.js into the console.
  3. console.log(JSON.stringify(Array.from(captured).map(d =&gt; d[1]), null, 2))
@drzax
drzax / README.md
Created January 25, 2016 10:41 — forked from eesur/README.md
d3 | Reusable slopegraph

Reusable slopegraph inspired/adapted from Ben Van Dyke's example into a reusable chart.

This slopegraph example shows the number of personal computers installed in a country per household. This includes desktop PCs and laptops, but excludes smartphones and terminals connected to mainframe computers. All figures are calculated using total number of Personal Computers and the Total Number of Households.

data source

@drzax
drzax / kill.sh
Created January 25, 2018 06:21 — forked from colingourlay/kill.sh
Kill McAfee
sudo /usr/local/McAfee/AntiMalware/VSControl stopoas
sudo killall VShieldService
sudo killall VShieldScanner
/** @jsx Preact.h */
import Preact from 'preact';
import Stage from './components/stage';
const container = document.querySelector('[data-encryption-explainer]');
const stage = container.querySelector('.scrollyteller-stage');
// Get rid of support message.
document.querySelector('.interactive_support_msg').parentNode.remove();
#!/usr/bin/env bash
open -n "/Applications/VLC.app" udp://@239.193.4.128:5000
/Applications/VLC.app/Contents/MacOS/VLC --no-audio udp://@239.193.4.70:5000 &
+ [*] who is (@candidate) [*]
- <call>candidate-info:who <star></call>
+ [*] who (@candidate) is [*]
@ who is <star>
+ [*] what [*] about [*] (@candidate) [*]
@ who is <star>
+ [*] what [*] (@candidate) [*] (electorate|seat) [*]