This file contains 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
tr -cd a-z\\n < /dev/urandom | grep -o -P "[aeiouy]?([bcdfghjklmnprstvxz][aeiouy]){2,}[bcdfghjklmnprstvxz]?" |
This file contains 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
for i in *.MOV; do ffmpeg -sameq -i $i -vcodec msmpeg4v2 -acodec libmp3lame ${i%.MOV}.avi; done |
This file contains 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
# Create the "certification authority". The private key of CA does not have to (and must not) be copied anywhere. | |
user@home$ ssh-keygen /home/user/.ssh/certification_authority | |
# Make CA public key trusted on a server. | |
user@home$ scp /home/user/.ssh/certification_authority.pub root@server: | |
root@server# cd; (echo -n "cert-authority "; cat certification_authority.pub ) >> .ssh/authorized_keys | |
# Generate a certificate for any command you can think of | |
# Example -- command: "tailf /var/log/messages" validity: 52 weeks from now Permissions: none (no forwarding etc.) | |
user@home$ ssh-keygen -f tailfmessages.key |
This file contains 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 | |
#rename iPhone image/video files | |
#use only for tagged files | |
for i in *.mov | |
do | |
TIME=`exiftool "$i" | grep "Media Create Date" | sed -e 's/Media Create Date *: //'` | |
TOUCHTIME=`echo $TIME | sed -e 's/:/-/;s/:/-/;'` | |
FILENAME=`echo $TIME | sed -e 's/:/-/g;s/ /_/'` |
This file contains 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
// ==UserScript== | |
// @name pdf test | |
// @namespace http://www.example.com | |
// @description Alerts with title and href of any pdf link. | |
// @include http*.sk/* | |
// ==/UserScript== | |
var links = document.getElementsByClassName('pdf'); | |
alert(links.length + ' pdfs on page'); | |
This file contains 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
for i in *.jpg; do s=${i%.jpg}; echo UPDATE stands set standPhoto=\"stands/$s.jpg\" where standName=\"$s\"\; ; done |
This file contains 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 | |
fileogg=$1 | |
name=${fileogg%.ogg} | |
file=$name.flac | |
ffmpeg -i $fileogg -ar 16000 $file 2>/dev/null | |
gsutil cp $file gs://transcribe | |
gcloud ml speech recognize-long-running gs://transcribe/$file --sample-rate 16000 --encoding flac --language-code='sk-SK' --async > $$.id | |
id=`jq -r .name < $$.id ` | |
gcloud ml speech operations wait $id > $name.json |