FORMAT DRIVE df0: NAME test
INSTALL ?
df0:
drawbridge /dev/ttyUSB0 test.adf READ
Using the toolchain from https://github.com/bebbo/amiga-gcc
m68k-amigaos-gcc hello.cpp -mcrt=nix13 -o hello
xdftool test.adf + write hello
xdftool test.adf list
drawbridge /dev/ttyUSB0 test.adf WRITE VERIFY
(Boot from floppy, start binary with "hello")
ansible-playbook -vv playbook.yml
ansible-playbook playbook.yml -t exampletag
htpasswd -c .htpasswd exampleuser
.htaccess:
AuthType Basic
AuthName "Protected directory"
AuthUserFile /full/path/to/.htpasswd
Require valid-user
awk '{ if ( length < 400 ) { print $0 } }' input.txt > short_lines.txt
awk '{ if ( length > x ) { x = length } } END { print x }' input.txt
cat input.txt | awk ' BEGIN { FS = "\t" } ; { if ($2 > 10) { print $2 "\t" $1 } } ' > field_2_greater_10.txt
npm install @capacitor/core
npm install @capacitor/cli --save-dev
npx cap init
npm install @capacitor/android
npx cap add android
export ANDROID_HOME=$HOME/Android
export PATH="$ANDROID_HOME/cmdline-tools/latest:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$PATH"
npx cap run android --list
npx cap run android --target [Target Id]
(Target Id
as listed by --list
)
# WARNING: destroys existing data
cryptsetup luksFormat /dev/sda5
cryptsetup luksOpen /dev/sda5 sda5_crypt
mkfs.ext4 /dev/mapper/sda5_crypt
cryptsetup luksOpen /dev/sda5 sda5_crypt
mount /dev/mapper/sda5_crypt /mnt/tmp
umount /mnt/tmp
cryptsetup luksClose sda5_crypt
dmsetup ls
(will list other logical volumes too)
lpstat -s
curl -v -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -X POST -d 'text=This+is+an+example.&language=en' "http://example.org/api/path"
date "+%Y%m%d_%H%M%S"
export MY_CHROOT="/mnt/tmp"
debootstrap --arch i386 --variant=minbase sid "$MY_CHROOT" http://ftp.de.debian.org/debian/
mount -t proc /proc "$MY_CHROOT/proc"
mount --rbind /sys "$MY_CHROOT/sys"
mount --rbind /dev "$MY_CHROOT/dev"
chroot "$MY_CHROOT" /bin/bash
unmount it after leaving chroot (exit / CTRL + D)
mount --make-rslave "$MY_CHROOT/sys"
mount --make-rslave "$MY_CHROOT/dev"
umount -R "$MY_CHROOT/sys"
umount -R "$MY_CHROOT/dev"
docker build -t example .
docker run -p 127.0.0.1:3000:3000 --restart unless-stopped --detached --name example example
docker run -i -t -v /path_on_host_to/app:/app example
docker container prune
docker image prune
docker save example > example.tar
docker load < example.tar
Using package dotnet-sdk-8.0
.
mkdir example && cd example
dotnet new console
dotnet build
bin/Debug/net8.0/example
dotnet run
dotnet add package example
cat VTS_04_[1-6].VOB | tcextract -x ps1 -t vob -a 0x20 > de
subtitle2vobsub -i VTS_04_0.IFO -p de -o subtitles_de
mkdir images_de
vobsub2pgm -i VTS_04_0.IFO -g 2 subtitles_de images_de/de
pgm2txt images_de/de
srttool -s -w < images_de/de.srtx > de.srt
exiv2 -d a filename.jpg
ffmpeg -i example.wav -ab 192k example.mp3
ffmpeg -sameq -ss 209 -t 26 -i XMjcCAkCNGM.flv postbank.flv
avconv -framerate 25 -f image2 -i reverse/%05d.png -i ../out.wav -c:a libmp3lame out.mp4
ffmpeg -f image2 -pattern_type glob -i '*.jpg' out.mp4
ffmpeg -i input.mp4 -af silencedetect=noise=0.05:duration=5 -f null -
ffmpeg -i input.dv -vcodec libx264 -filter:v yadif -an output.avi
ffmpeg -i dvgrab-2016.02.06_16-28-04--00\:10\:32\:18.avi -vcodec libx264 -filter:v "crop=576:576:0:0, yadif=1" -an out.avi
ffmpeg -i float.avi -ss 00:00:16 -t 00:00:59 -vcodec libx264 -crf 10 -filter:v "crop=540:540:0:0, yadif=1" -an out/float.avi
ffmpeg -i tmp/float_cut_dv.avi -f lavfi -i color=c=black:size=20x535 -i tmp/float_cut_dv.avi -filter_complex "[0:v:0]pad=535*2+20:ih,yadif=1[bg]; [bg][1:v:0]overlay=535[bg2]; [bg2][2:v:0]overlay=555,yadif=1" -vcodec libx264 -crf 10 -preset ultrafast test3.avi
ffmpeg -i tmp/float_cut_dv.avi -f lavfi -i color=c=black:size=20x535 -i tmp/float_cut_dv.avi -filter_complex "[0:v:0]pad=535*2+20:ih,yadif=1[bg]; [bg][1:v:0]overlay=535[bg2]; [bg2][2:v:0]overlay=555,yadif=1,crop=535*2+20:535" -vcodec libx264 -crf 10 -preset ultrafast test3.avi
ffmpeg -i "concat:input.avi|input.avi" -vc copy -an output.avi
ffmpeg -i "concat:input.avi|input.avi" -ss 00:00:30 -t 00:01:00 -vc copy -an output.avi
ffmpeg -i input.mp4 -vframes 1 output.png
ffmpeg -i 1.MTS -i 2.MTS -filter_complex '[0:v][1:v] blend=shortest=1:all_mode=overlay:all_opacity=0.5' -vcodec libx264 -crf 30 -an -y result.mp4
ffmpeg -i in.mp4 -filter:v "scale=1920:1012" out.mp4
ffmpeg -i input.mp4 -vn -acodec copy audio.mp3
ffmpeg -y -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 -frames 1 "output_$(date '+%Y%m%d_%H%M%S').jpg"
ffmpeg ... -an ...
ffmpeg -i "$1" -vn -c:a copy /tmp/dv_audio.wav
sox -r 48k /tmp/dv_audio.wav /tmp/dv_audio_48k.wav
ffmpeg -i "$1" -i /tmp/dv_audio_48k.wav -c:v copy -c:a copy -map 0:v:0 -map 1:a:0 "$1.fixed.avi"
ffmpeg -ss 0:48 -i 00034.MTS -frames 1 34_00-48.jpg
ffmpeg -i input.mov -c:v libx264 -c:a aac -pix_fmt yuv420p output.yuv420p.h264.aac.mp4
ffmpeg -i in.mp4 -filter:v yadif -c:a aac -c:v libx264 -pix_fmt yuv420p out.aac.h264.mp4
find -type f -mtime +10
gcc -fno-stack-protector execute.c
gcc -z execstack execute.c
gcc -fno-stack-protector -m32 execute.c
echo 0 > /proc/sys/kernel/randomize_va_space
git init --bare example.git
git clone ~/path/to/example.git
cd example
echo "Hello world!" > README
git add README
git commit .
git push ~/path/to/example.git master
git config user.name "John Doe"
git config user.email john.doe@example.org
git clone user@example.org:repositories/example.git
git clone ~/path/to/example.git
git clone --bare -l example example.git
git rm -r --cached .
git add .
git clone --depth 1 https://github.com/user/repo.git
git clone --depth 1 --branch example-tag https://github.com/user/repo.git
git config gpg.format ssh
git config user.signingkey ~/.ssh/git_signing_key.pub
git config commit.gpgsign true
plot [-5:5] sin(x),cos(x)
plot [-5:5] [-2:2] sin(x),cos(x)
replot
set xlabel "x"
set ylabel "y"
plot [-5:5] sin(x) lw 2,cos(x) lw 10
plot sin(x) title "Sine function"
set terminal png
set output "example.png"
set terminal
set zeroaxis
set grid
set xtics 3.14159
set ytics 0.5
v = 2
m = 0
f(x) = 1/(v*sqrt(2*pi))*exp(-0.5*((x-m)/v)**2)
plot [-9:9] [-0.1:0.5] f(x)
plot [-5:5] [-3:3] (x > 3.14159/2 ? sin(x) : cos(x))
plot "example.csv" using 1:2 with lines
set xdata time
set timefmt "%d.%m.%Y" # date format used in input file
set xtics rotate by -45
set format x "%Y-%m-%d" # date format for output
plot [] [-20:40] "data.csv" using 1:2 title "Column 2" with lines, "data.csv" using 1:3 title "Column 3" with lines
plot [-15:35] [-15:35] "data.csv" using 2:3
plot [-15:35] [-15:35] "data.csv" using 3:($3-$4)
set multiplot layout 2,1
plot sin(x)
plot x**2
set xrange [0:30]
set sample 30
q(x) = (x <= 2) ? 1 : q(x-q(x-1))+q(x-q(x-2))
plot q(x)
p(x) = a0+a1*x+a2*x**2
fit p(x) "data.csv" via a0, a1, a2
plot "data.csv" using 1:2 title "measurements", p(x) title "interpolation"
apt install grub-imageboot
then after rebooting in Grub press C and enter
linux16 /memdisk
initrd16 (hd0,msdos5)/home/user/Downloads/example.iso
boot
iconv --from-code=ISO-8859-1 --to-code=UTF-8 input.txt > output.txt
convert in.jpg -colorspace gray out.jpg
or
convert in.jpg -set colorspace RGB -colorspace gray out.jpg
convert in.jpg -crop 10x10+10+10 out.jpg
(target size 10x10 offset 10, 10)
convert in.jpg -resize 800x out.jpg
for f in * ; do convert "$f" -resize "250x250>" "../photos_small/$f.jpg" ; done
convert -verbose -density 1200 -trim input.pdf[0] -quality 97 output.jpg
jar tf example.jar
jar xf example.jar path/inside/jar/to/file1.txt path/inside/jar/to/file2.txt
sudo systemctl stop apache2
sudo certbot certonly --cert-name example.org --standalone -d "domain1.example.org,domain2.example.org"
sudo systemctl start apache2
The created certificates can be used for HTTPS in Apache in a VirtualHost configuration:
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/example.org/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.org/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example.org/fullchain.pem
certbot certificates
certbot delete
sudo service apache2 stop ; sudo certbot renew ; sudo service apache2 start
lvcreate --size 2TB --name example-lv example-vg
pvs
vgs
lvs
lvremove vg0/lvol0
PDF = $(patsubst %.tex,%.pdf,$(wildcard *.tex))
all: $(PDF)
%.pdf: %.tex
pdflatex $<
clean:
rm *.pdf
mencoder -oac copy -ovc copy mf://*jpg -audiofile audio.mp3 -o out.avi
or with resolution and fps
mencoder -ovc x264 -oac copy mf://*jpg -mf w=1280:h=960:fps=25:type=jpg -o out.avi
mencoder -ss 00:00:00 -endpos 00:02:18 -oac copy -ovc copy in.avi -o out.avi
The input device name can be obtained using arecord -L
. The sox call is required to strip one of the channels (use remix 2
to select the right channel).
arecord -D "hw:CARD=PCH,DEV=0" -c 2 -r 44100 -f S16_LE -t raw - | sox -t raw -r 44100 -e signed-integer -b 16 -c 2 - -t wav - remix 1 | minimodem -r 1200 -S 1200 -M 2400 --startbits 1 --stopbits 2 -f - | hd
mplayer -vc null -vo null -ao pcm:fast:waveheader:file=output.wav input.flv
mplayer -http-header-fields "Referer: http://example.org/referer" http://example.org/example.mp4
bload"cas:"
bload"cas:",r
run"cas:"
npm list
npm list -a
npm run lint -ws
npm rebuild --runtime=node-webkit --target_arch=x64 --target=0.43.6
values = [6, 7, 2, 8, 5, 4, 2, 9].*2
values = 5:10
H = bar(values)
x = zeros(1, 5)
for i in [1, 3, 6]
i
end
x = {'a', 'b', 'c'}
ogr2ogr -f GeoJSON -t_srs crs:84 example_output.geojson example_input.shp
ogr2ogr -f "PDF" -s_srs WGS84 -t_srs EPSG:3857 example_output.pdf example_input.json
Win + Alt + O + F
(PC keyboard)
devalias
dev usb0
ls
dev usb1
ls
...
boot usb2/disk2,\\:tbxi
(not working on PowerMac G5?)
openmsx -machine "Philips_VG_8020-20" rom-filename.rom
openssl req -new -x509 -days 365 -nodes -out /etc/ssl/certs/name.pem -keyout /etc/ssl/private/name.key
openssl x509 -sha1 -in /etc/ssl/certs/name.pem -noout -fingerprint
openssl x509 -enddate -noout -in /etc/ssl/certs/name.pem
openssl pkcs12 -info -in example.p12 -noenc
openssl s_client -CAfile /etc/ssl/certs/ca-certificates.crt -starttls smtp -connect mail.example.org:25
pdfnup --nup 1x2 --batch input.pdf --outfile out.pdf --no-landscape
php -d memory_limit=1024M example.php
php -S localhost:8000 --docroot .
/usr/sbin/postmap /etc/postfix/virtual
shp2pgsql -W Windows-1250 -s 3765:4326 -I example.shp target_table | psql database
qemu-system-i386 -kernel bzImage -initrd rootfs.cpio
qemu-system-i386 -kernel bzImage -initrd rootfs.cpio -nographic -append 'console=ttyS0'
unzip -p 2019-09-26-raspbian-buster-lite.zip | sudo dd of=/dev/mmcblk0 bs=4M conv=fsync
sed ':a;N;$!ba;s/\n/ /g'
smartctl -i /dev/sda
smartctl -H /dev/sda
smartctl -A /dev/sda
Check for Reallocated Sector Count. Should be 0 for healthy drives.
sox in.mp3 out.mp3 rate 16k
ssh -N -R 2208:localhost:22 example.org
dropbearkey -t rsa -f id_rsa
ssh -D8080 host
then either configure SOCKS4-proxy in browser (localhost:8080) or use tsocks
ssh -o PreferredAuthentications=password user@example.org
ssh -i ~/.ssh/private_key_file user@example.org
ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key
can be used for ~/.ssh/private_key_file
too
coredumpctl info
coredumpctl debug
Edit /etc/tsocks.txt
server = 127.0.0.1
server_type = 5
server_port = 1080
Connect with SOCKS "tunneling" enabled
ssh -D1080 example.org
Pass program to launch as argument to tsocks
tsocks firefox
sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next
sudo apt-get update
sudo apt-get install ffmpeg
wget --post-data="XDEBUG_PROFILE=1" -qO /dev/null "http://example.org/search?q=blahblah"
docker run -v ${PWD}:/src/ -it z88dk/z88dk zcc +kc -create-app src/example.c -o example
Will create EXAMPLE.KCC that should be runnable using emulators.