Skip to content

Instantly share code, notes, and snippets.

View blackhalt's full-sized avatar
🎯
Focusing

BlackHalt blackhalt

🎯
Focusing
View GitHub Profile
@blackhalt
blackhalt / pele2.sh
Created August 30, 2017 09:35
Zīmējam no komandrindas GIMPā
#!/bin/bash
sleep 3
x=800
for y in {0..900..50}
do
if ($y>0)
@blackhalt
blackhalt / pele.sh
Created August 30, 2017 05:56
Zīmēt no komandrindas ;)
sleep 1
xdotool search "Untitled" windowactivate --sync mousemove --window %1 804 230 #te jārēķina sava ekrāna izšķirtspējas izmēri.Peles sākumpunkts
sleep 0.5
xdotool mousedown 1
sleep 0.5
xdotool mousemove_relative --sync 500 500
sleep 0.5
xdotool mouseup 1
@blackhalt
blackhalt / .bash_aliases
Created June 2, 2017 01:28
Bash alias for longurl
longurl(){
URL=$1
while [ -n "${URL}" ]
do
echo $URL
URL=$(curl -sw "\n\n%{redirect_url}" "${URL}" | tail -n 1)
done
}
#1
curl -s -o /dev/null --head -w "%{url_effective}\n" -L "LONGURL"
#2
wget "$LONGURL" 2>&1 | grep Location:
#3
URL="LONGURL"
while [ -n "${URL}" ]
do
@blackhalt
blackhalt / windou$-ki77er.html
Created May 23, 2017 20:24
windou$-ki77er.html
<img src="file://c:/$mft/123">
@blackhalt
blackhalt / grub.sh
Created April 5, 2017 20:08
Kaut kā tā
sudo -i
mkdir /mnt/chroot
mount /dev/sda3 /mnt/chroot
mount -o bind /dev /mnt/chroot/dev
mount -o bind /sys /mnt/chroot/sys
mount -o bind /proc /mnt/chroot/proc
chroot /mnt/chroot
update-grub
@blackhalt
blackhalt / find-grub.sh
Created April 5, 2017 18:04
Kur ir mans GRUB?!
sudo fdisk -l 2>/dev/null | egrep "Disk /|/dev/" | sed "s#^/dev/#Part /dev/#" | awk '{print $2}' | sed 's/://' | xargs -n1 -IX sudo sh -c "hexdump -v -s 0x80 -n 2 -e '2/1 \"%x\" \"\\n\"' X | xargs -n1 -IY sh -c \"case \"Y\" in '48b4') echo X: GRUB 2 v1.96 ;; 'aa75' | '5272') echo X: GRUB Legacy ;; '7c3c') echo X: GRUB 2 v1.97 oder v1.98 ;; '020') echo X: GRUB 2 v1.99 ;; *) echo X: Kein GRUB Y ;; esac\""
@blackhalt
blackhalt / opaaa.txt
Created December 3, 2016 18:33
Sandras Veinbergas Olugalvas 2016-12-03
@Ucibucis
@MikelisM
@baldone1000
@karlissilins
@Tornitis7
@Zile999
@MaraVilde
@IlvaKrampuza
@aaralds
@oposums
@blackhalt
blackhalt / salime.sh
Created June 9, 2016 10:52
Salīmē pats
wget http://mtgxlv01-vh.akamaihd.net/i/tv3/filmas/2013.04.13.monuments_549649.mp4/segment{1..245}_0_av.ts
cat segment{1..245}_0_av.ts > full_video.ts
ffmpeg -i full_video.ts full_video.mp4
<html>
<head>
<title></title>
<meta content="">
<style></style>
</head>
<body>
<script type="text/javascript">
function updateValues() {