Skip to content

Instantly share code, notes, and snippets.

@ikanoano
ikanoano / td.js
Created December 3, 2021 19:10
extract tweets from timeline
var env = function () {
const extUrl = /\(([^)]+)\)/;
const mo =
window.MutationObserver ||
window.WebKitMutationObserver ||
window.MozMutationObserver;
const target = document.querySelector('.js-chirp-container');
const observer = new mo(function (mutations) {
mutations.forEach((mutation) => {
const column = mutation.target;
#!/bin/sh
cnt=1;
zero=`date +%s`
ping -4 -i1 $(ip) | while read line; do
line=`echo $line | awk -F= '{print $4}'`
now=$((`date +%s` - $zero))
timestamp="$(( $now/3600 )):$(( ($now/60)%60 )):$(( $now%60 ))"
timestamp="$timestamp,000 --> $timestamp,999"
echo $cnt
echo $timestamp
@ikanoano
ikanoano / rec.sh
Last active October 26, 2019 17:58
#!/bin/bash
# https://devblogs.nvidia.com/nvidia-ffmpeg-transcoding-guide/
ga=$(pactl list sources | grep Name | sed 's/.*Name: //' | grep analog-stereo | grep -v monitor)
vo=$(pactl list sources | grep Name | sed 's/.*Name: //' | grep USB)
vc=$(pactl list sources | grep Name | sed 's/.*Name: //' | grep analog-stereo.monitor)
qp=36
input_pre="-use_wallclock_as_timestamps 1 -thread_queue_size 1024"
soundin="-f pulse $input_pre -i $ga"