Linux
Jump to navigation
Jump to search
solitaire houdini win
#if false; then #res=`wmctrl -lG` #res=`wmctrl -lG | grep "Converting geometry"` #res=`wmctrl -lG | grep "(0x\S*)\s{1,}0"` #win=`echo $res | awk '{print $1;}'` #fi #echo $id desktop=`wmctrl -d | grep \* | awk '{print $1}'` win=`wmctrl -lG | awk '($2=='$desktop') && ($6==97) {print $0 }'` #get window on current desktop that has a height of 97, hope thereś only one winid=`echo $win | awk '{print $1;}'` x=`echo $win | awk '{print $3;}'` y=`echo $win | awk '{print $4;}'` xvel=$((5 + RANDOM % 20)) yvel=$((5 + RANDOM % 10)) for ((i=1; i<=30; i++)); do yvel=`awk 'BEGIN {print '$yvel'+'9.8'}'` xdif= #xdif=`awk 'BEGIN {print '$xdif'*'.9'}'` #ydif=`awk 'BEGIN {print '$ydif'*'1.1'}'` x=`awk 'BEGIN{printf "%0.0f\n", '$xdif'+'$x'}'` y=`awk 'BEGIN{printf "%0.0f\n", '$ydif'+'$y'}'` #xdif=$(($xdif*0.9)) #ydif=$(($ydif*1.3)) #x=$(($x+$xdif)) #y=$(($y+$ydif)) wmctrl -i -r $win -e 1,$x,$y,-1,-1 #echo $y #echo $y done #echo $winid
maya command port and telnet
In maya: commandPort -n ":54321";
for i in {99..201..1}; do ( echo 'currentTime -e ' $i sleep 1 echo 'bakeToon' ) | telnet 127.0.0.1 54321 sleep 15 done
siphoning
for value in $(seq -f "%04g" 63 64) do url=`curl http://hdrlib.com/get_info.php?id=$value | grep -o -E '(http://hdr)(.*)[0-9]'` dlurl=`curl $url | grep -o -E 'nbsp;<a href(.*)(orig)"'` dlurl=http://hdrlib.rat9.com/${dlurl:14} wget -O hdrlib.com.$value.hdr ${dlurl%?} done
misc bash
for i in $(wmctrl -l | grep 'File Browser' | cut -c-10) ; do echo foo: $i ; done > foo: 0x0180b9ae > foo: 0x0180bd99
small/guff tcsh STARTUP
# Define some colors first: set red="%{\033[1;31m%}" set green="%{\033[0;32m%}" set yellow="%{\033[1;33m%}" set blue="%{\033[1;34m%}" set magenta="%{\033[1;35m%}" set cyan="%{\033[1;36m%}" set white="%{\033[0;37m%}" set nc="%{\033[0m%}" #PS1="$BLUE[\h] $NC\u $GREEN\W $NC> " #export LANG=en_US.UTF-8 #export XDG_CACHE_HOME=/var/tmp/xdg-cache-$USER ##### # All user specific bash aliases and functions should go here #PS1="$CYAN\A $BLUE[\h] $NC${USERNAME:0:5} $GREEN\W $NC: " #set prompt="${green}%n${blue}@%m ${white}%~ ${green}%%${nc} " set prompt="${green}%n${blue}%m${yellow}%~${white}>${nc} " #set prompt="%{\033[2;41;32m%}%m%{\033[0m%} " #CUSTOM ALIASES alias km 'killall -9 maya.bin' alias k 'killall -9' alias r 'xdg-open ~/radios.m3u' alias kall 'killall -9 maya.bin;killall -9 houdini-bin' alias c clear alias cd 'cd \!* && ls -d */ --color=never' set autolist set color set colorcat #bnp alias arte "---" clear alias ss 'set t=screenshot_`date +"%Y%m%d_%H%M%S"`;import -window root -silent ~/work/$t.png'
mikros bashrc
echo '(loading custom ubashrc)' alias c='clear' alias e='thunar' alias h='houdiniBeta' alias ali='nano ~/.userbashrc && source ~/.userbashrc' PI=`curl -s https://berniebernie.fr/pi` alias pi='ssh pi@$PI' echo '(end load ubashrc)'
bashrc
# All user specific bash aliases and functions should go here #!/bin/bash #Background Colors E=$(tput sgr0); R=$(tput setab 1); G=$(tput setab 2); Y=$(tput setab 3); B=$(tput setab 4); M=$(tput setab 5); C=$(tput setab 6); W=$(tput setab 7); function e() { echo -e "$E"; } function x() { echo -n "$E "; } function r() { echo -n "$R "; } function g() { echo -n "$G "; } function y() { echo -n "$Y "; } function b() { echo -n "$B "; } function m() { echo -n "$M "; } function c() { echo -n "$C "; } function w() { echo -n "$W "; } #putpixels function u() { h="$*";o=${h:0:1};v=${h:1}; for i in `seq $v` do $o; done } img="\ x40 e1 x40 e1 x40 e1 x40 e1 x40 e1 x40 e1 x40 e1 x3 b2 x2 b2 x2 b4 x2 b2 x4 b4 x13 e1 x3 b2 y1 x1 b2 y1 b6 y1 b2 y1 x2 b6 y1 x11 e1 x3 b2 y1 x1 b2 y1 b2 y2 b2 y1 b2 y1 x2 b2 y2 b2 y1 x11 e1 x3 b6 y1 b2 y1 x1 b2 y1 b2 y1 x2 b2 y1 x1 b2 y1 x11 e1 x3 b6 y1 b2 y1 x1 b2 y1 b2 y1 x2 b2 y1 x1 b2 y1 x11 e1 x5 b2 y3 b2 y1 x1 b2 y1 b2 y1 x2 b2 y1 x1 b2 y1 x11 e1 x5 b2 y1 x2 b6 y1 b2 y1 x2 b6 y1 x11 e1 x5 b2 y1 x3 b4 y1 x1 b4 x2 b4 y1 x12 e1 x6 y2 x4 y3 x3 y4 x2 y3 x13 e1 x40 e1 x40 e1 x40 e1 x40 e1 x40 e1 x40 e1 x40" for n in $img do u $n done e; ####################################################################### PS1="$CYAN\A $BLUE[\h] $NC${USERNAME:0:5} $GREEN\W $NC: " #CUSTOM ALIASES alias s="pp-launch-sublime-text" alias km="killall -9 maya.bin" alias r="curl http://mlkdesign.free.fr/dump/radios.m3u > ~/Downloads/radios.m3u && xdg-open ~/Downloads/radios.m3u && exit" alias w="xdg-open http://berniebernie.fr/wiki" alias k='killall' alias kall='killall -9 maya.bin;killall -9 houdini-bin' #alias setuphoudini='cd /prod/softprod/apps/houdini/14.0.395/linux ; source ./houdini_setup_bash' #alias s='/prod/softprod/apps/sublime_text/3b/linux/sublime_text' alias ss='echo | grep -o -E "'"(\/.*\.[a-z]{1,3})"'"' alias la='ls -aF' alias edit='s ~/.bashrc_user&source ~/.bashrc_user' alias log='xdg-open https://wizz.shotgunstudio.com/detail/HumanUser/380' alias c='clear' alias removemxsmxi='rm -f `find . -type f -name "*.mxi" -o -name "*.mxs"`' alias brume='cd /prod/project/BRUME_16_1019/sequences/030/030_0040/sfx/' #alias tm='gnome-system-monitor&' alias pipi='ssh "pi@$(curl -s https://berniebernie.fr/ip | head -1 2>/dev/null)"' function echo_output() { echo "$@" } function getPath(){ #grep -o -E ".*" "$@"; grep -rnI '.*' "$@" | sed; } function ro () { if [[ "$1" = "i" ]]; then printf -v a "%04d" $2 printf -v b "%04d" $3 echo $a $b fi }