ffmpeg -r 24 -pattern_type glob -i '*.JPG' -s hd1080 -vcodec libx264 timelapse.mp4
-r 24- output frame rate-pattern_type glob -i '*.JPG'- all JPG files in the current directory-s hd1080- 1920x1080 resolution
| while true; do | |
| (echo -e 'HTTP/1.1 200 OK\r\n'; echo -e "\n\tMy website has date function" ; echo -e "\t$(date)\n") | nc -lp 8080; | |
| done |
| #!/usr/bin/env python3 | |
| import os | |
| import sys | |
| import subprocess | |
| import re | |
| import argparse | |
| import hashlib | |
| args = None |
| #include <stdio.h> | |
| #include <limits.h> | |
| #include <float.h> | |
| #include <math.h> | |
| #define STRFY(A) #A | |
| #define SIZEOFI(T,MIN,MAX) printf("%-20s\t%5zu\t%20lld\t%20llu\n", STRFY(T), sizeof(T), (long long)MIN, (unsigned long long)MAX); | |
| #define SIZEOFFP(T,MIN,MAX,RES) printf("%-20s\t%5zu\t%20Lg\t%20Lg\t%20Lg\n", STRFY(T), sizeof(T), (long double)MIN, (long double)MAX, (long double)RES); | |
| void main() { |
| #include <stdio.h> | |
| #define LOOP_ON_GENERIC(T, A, AL, I) \ | |
| T* I = NULL; \ | |
| T** I##_p = NULL; \ | |
| if (A) \ | |
| for(I##_p = A, I = *I##_p; \ | |
| I##_p < A + AL; \ | |
| I##_p++, I = (I##_p < A + AL ? *I##_p:NULL)) |
| use std::sync::{Arc, Mutex}; | |
| pub struct Foo { | |
| pub a: i32, | |
| pub b: i32, | |
| } | |
| pub fn function(foo: Arc<Mutex<Foo>>){ | |
| let foo = &mut *(foo.lock().unwrap()); | |
| inner(&mut foo.a, &mut foo.b); |
| color_prompt="yes" | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
| } | |
| if [ "$color_prompt" = "yes" ]; then | |
| PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ ' | |
| else | |
| PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ ' | |
| fi | |
| unset color_prompt |
| PROG = bakery | |
| all: clean $(PROG) | |
| $(PROG): $(PROG).c | |
| gcc -g -o $@ -pthread -O0 $(CFLAGS) $< | |
| clean: | |
| -rm $(PROG) |
SWIDTH=$((cd /tmp/.X11-unix && for x in X*; do DISPLAY=":${x#X}" xdpyinfo | grep dimensions; exit 0; done) | grep -oP '[0-9]+x[0-9]+(?= pixels)' | cut -f1 -dx)
SHEIGHT=$((cd /tmp/.X11-unix && for x in X*; do DISPLAY=":${x#X}" xdpyinfo | grep dimensions; exit 0; done) | grep -oP '[0-9]+x[0-9]+(?= pixels)' | cut -f2 -dx)
wmctrl -d | egrep '^[0-9]+\s+\*' | cut -f1 -d" "
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import datetime | |
| fname="{}.{}.cli".format(os.path.basename(sys.argv[0]), datetime.datetime.today().strftime('%Y-%m-%d_%H-%M-%S')) | |
| path=os.path.join(os.path.expanduser("~"), "Desktop", fname) | |
| with open(path, "w") as f: | |
| f.write(" ".join(sys.argv)) | |
| print("Wrote \"{}\" with \"{}\"".format(path," ".join(sys.argv))) |