Skip to content

Instantly share code, notes, and snippets.

View blackhalt's full-sized avatar
🎯
Focusing

BlackHalt blackhalt

🎯
Focusing
View GitHub Profile
javascript:function sleep(milliseconds){var start = new Date().getTime();for (var i = 0; i < 1e7; i++) {if ((new Date().getTime() - start) > milliseconds){break;}}};e=document.querySelectorAll('input[alt="Follow"]');for(i=0;i<21;i++){e[i].click();sleep(1000);}void(0);
@blackhalt
blackhalt / random_gif.sh
Created October 28, 2019 15:03
random_gif.sh
#!/bin/bash
convert -size 512x512 xc: +noise Random random.png
name="$(date +%s)"
for i in `seq 0 10 359`; do
j=`expr $i \* 5`
convert random.png -channel G \
-function Sinusoid 1,${i} \
-virtual-pixel tile -blur 0x40 -auto-level \
#!/bin/sh
IN="$1"
filename=$(basename "${IN}")
filename="${filename%.*}"
PAGES=$(pdfinfo "$IN" | grep ^Pages: | tr -dc '0-9')
non_blank() {
for i in $(seq 1 $PAGES)
do
PERCENT=$(gs -o - -dFirstPage=${i} -dLastPage=${i} -sDEVICE=inkcov "$IN" | grep CMYK | nawk 'BEGIN { sum=0; } {sum += $1 + $2 + $3 + $4;} END { printf "%.5f\n", sum } ')
@blackhalt
blackhalt / Tid.js
Created March 7, 2019 10:21
Twitter bookmarklet
javascript:e=document.querySelector("div.ProfileNav[data-user-id]");f=e.dataset.userId;void(open("https://twitter.com/intent/user?user_id="+f))
@blackhalt
blackhalt / bildes.js
Created February 22, 2019 17:02
Attēlu savācēju Bookmarkleti
// Tvitera galeriju bilžu savacejs:
javascript:e=document.querySelector("div.Gallery-media > img[src]");f=e.src;void(open(f))
// LSM bilžu savacējs:
javascript:var img = document.querySelector("div.slick-active > figure"),style = img.currentStyle || window.getComputedStyle(img, false),bi = style.backgroundImage.slice(4, -1).replace(/"/g, "");void(open(bi))
@blackhalt
blackhalt / video_th.sh
Last active February 10, 2019 23:41
Video Thumbnail Renew
#!/bin/bash
#For Nemo, Nautilus actions: Exec=/blabla/video_th.sh '%P/%f'
# Ar specsimboliem neJiet :/
# gg=$(echo -n "$aa" | iconv -f UTF8 -t ASCII//TRANSLIT | tr ' ' '_')
fn=$(echo -n "file://`readlink -f $1`" | md5sum | awk '{print $1}')
find $HOME/.cache/thumbnails/ -name "$fn." -exec rm {} \;
ffmpegthumbnailer -s 128 -i "$1" -o $HOME/.cache/thumbnails/normal/"$fn".png -c png -t 10
@blackhalt
blackhalt / Recipe.git
Created January 3, 2019 03:34 — forked from aferrero2707/Recipe.git
AppImage recipe for building GIMP from git
#! /bin/bash
FULL_BUNDLING=0
UPDATE=1
REBUILD=1
PREFIX=/zzz
# Move blacklisted files to a special folder
move_blacklisted()
@blackhalt
blackhalt / ffmpeg.md
Created April 15, 2018 19:10 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@blackhalt
blackhalt / userContent.css
Last active November 18, 2017 04:18
newtab platāka lapa (man ir tikai tikai Top sites)
/*profils/chrome/userContent.css*/
/* Jāņem verā:
browser.newtabpage.columns
browser.newtabpage.rows
Jā, un browser.newtabpage.activity-stream.topSitesCount
*/
@-moz-document url("about:newtab") {
@blackhalt
blackhalt / Roberts Gobziņš - Pilots idiots.txt
Created September 11, 2017 11:22
Roberts Gobziņš - Pilots idiots
İLHAN İREM Don Kişot Lyrics
Sesleriniz cılızlaştı dostlar, yankılanmıyor
Yollarımız gitgide uzaklaşıyor
Mavi kubbeli bir odada, koro halinde
Bağırıp durmayın yeter, 'Daha çok ver' diye
Veremem veremem veremem veremem
Bir kalbim kaldı
Veremem veremem veremem veremem