start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env python3 | |
from argparse import ArgumentParser | |
from datetime import datetime, timedelta | |
from pathlib import Path | |
import json | |
import re | |
import subprocess | |
import sys | |
import tempfile |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#ifdef _MSC_VER | |
#include <intrin.h> /* for rdtscp and clflush */ | |
#pragma optimize("gt",on) | |
#else | |
#include <x86intrin.h> /* for rdtscp and clflush */ | |
#endif |
#!/usr/bin/env sh | |
# rename this script to whichever windows executable you want to wrap | |
# make sure to place this script ahead in the PATH lookup obviously | |
executable="$(command which --all "$(basename "$0")" | grep --max-count=1 --invert-match "$(realpath --no-symlinks "$0")")" | |
if [ -t 0 -a -t 1 ]; then | |
exec winpty "$(realpath "$executable")" "$@" |
1. Install re2c | |
git clone --depth 1 https://github.com/skvadrik/re2c.git | |
./autogen.sh | |
./configure --prefix=/usr | |
make && make install | |
2. Install ninja | |
git clone --depth 1 https://github.com/ninja-build/ninja.git | |
./configure.py --bootstrap | |
mv ninja.exe /usr/bin |
#!/bin/sh | |
# | |
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service | |
# | |
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net> | |
# | |
# Prerequisites: | |
# — MSYS2 itself: http://sourceforge.net/projects/msys2/ | |
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights | |
# |
#!/bin/sh | |
URL=$1 | |
CHANNELS=$(echo $URL | sed -e 's/http:\/\/multitwitch.tv\///g') | |
IFS="/" | |
for CHANNEL in $CHANNELS; do | |
livestreamer twitch.tv/$CHANNEL best & | |
done |
#!/usr/bin/env bash | |
set -e | |
YOUTUBE_FORMATS=$(youtube-dl -F "$1") | |
if [[ "$YOUTUBE_FORMATS" == *"(DASH Video)"* ]]; then | |
VIDEO_NAME=$(youtube-dl --get-filename "$1") | |
VIDEO_NAME_TMP="$VIDEO_NAME.tmp" | |
echo "Filename: $VIDEO_NAME" |