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
LIST=$(curl https://www.last.fm/player/station/user/$USER/recommended?ajax=1 | jq -r '.playlist|.[]|._playlinks|.[0]|.url') | |
FILENAME="lastfm.pls" | |
echo "" > $FILENAME | |
i=1 | |
for url in $LIST | |
do | |
echo "File$i=$url" >> $FILENAME | |
i=$((i+1)) | |
done |
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 | |
MASK="mask.png" | |
NEGATE_FIXED="negate_fixed.png" | |
NEGATE="negate.png" | |
#convert -density 300 -trim test.pdf -quality 100 -flatten -sharpen 0x1.0 test.jpg | |
convert $MASK -negate $MASK | |
for i in *.png | |
do | |
convert $i -negate $NEGATE |
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 | |
if [ $# -lt 1 ] | |
then | |
echo "Usage: $0 movie.mp4" | |
exit | |
fi | |
ffmpeg -loglevel quiet -i $1 -vcodec copy -vbsf h264_mp4toannexb -an -t 1 out.h264 | |
echo $(h264_analyze out.h264 2>&1 | grep -B 6 SPS | head -n1 | cut -c 4- | xxd -r -p | base64)","$(h264_analyze out.h264 2>&1 | grep -B 5 PPS | head -n1 | cut -c 4- | xxd -r -p | |
| base64) | |
rm -f out.h264 |
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
ffmpeg -i input.ts -af "anequalizer=c0 f=120 w=20 g=-20|c0 f=270 w=20 g=-20|c1 f=120 w=20 g=-20|c1 f=270 w=20 g=-20" -c:v copy -c:a aac output.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
preset="-c:v h264 -crf 18 -preset veryslow" | |
width=640 | |
height=1136 | |
audiorate=44100 | |
output="output.ts" | |
rm -rf processed $output | |
mkdir processed | |
pad_vertical() { |
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 bash | |
JQ="jq" | |
TEMP="temp.json" | |
COMMENTS="comments.txt" | |
CURSOR="" | |
PARAM="" | |
echo "" > ${TEMP} | |
echo "" > ${COMMENTS} |
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
function addGroupToReplyList(id) { | |
var obj = [id,"","/","my_group"]; | |
if (!window.replyAsList) | |
replyAsList = []; | |
replyAsList.push(obj); | |
if (!window.replyAsData) | |
replyAsData = {}; | |
replyAsData[id]=obj; | |
} | |
addGroupToReplyList(-123456); |
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
# Dependencies: | |
# jq https://stedolan.github.io/jq/ | |
# ffmpeg https://ffmpeg.org/ | |
# Usage: | |
# add to crontab schedule with command: twitch.sh [username] [oauth token] | |
USER="$1" | |
OAUTH="$2" | |
FFMPEG="ffmpeg" # change this if you have ffmpeg installed in other place | |
JQ="./jq" # change this if you have jq downloaded in other directory. By default, jq called from current directory. |
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
curl -H "Accept: application/json" https://rcs.school2100.com/api/bookapplication/v3.0/books |
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
var a = [].slice.call($0.children).sort(function(a,b){return a.innerHTML>b.innerHTML}); | |
for (i in a) $0.appendChild(a[i]); |
NewerOlder