User Tools

Site Tools


people:glen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
people:glen [2012-12-20 11:00]
glen add Dropbox as picture share service
people:glen [2014-07-22 16:48]
glen [Dropbox as picture share service] update
Line 1: Line 1:
 +====== Elan Ruusamäe ======
  
- 
-====== Elan Ruusamäe ====== 
 [[http://​cia.vc/​stats/​author/​glen|{{http://​dev.gentoo.org/​~spock/​img/​icons/​cia-stats.png?​}}]] ​ [[http://​cia.vc/​stats/​author/​glen|{{http://​dev.gentoo.org/​~spock/​img/​icons/​cia-stats.png?​}}]] ​
- 
-/* UndefinedMacro:​ TableOfContents(None) */  
- 
  
  
Line 11: Line 7:
  
   * [[:​packages:​pear|PEAR Info]] ​   * [[:​packages:​pear|PEAR Info]] ​
-  * [[http://​www.tld-linux.org/​|Linux Titanium info]] ​+  * [[http://​www.tld-linux.org/​|TLD Linux (former PLD Titaniuminfo]] ​
   * [[:​docs:​vserver|PLD Linux Vserver pages]] ​   * [[:​docs:​vserver|PLD Linux Vserver pages]] ​
   * [[::​developingpld|Developing PLD Linux]] ​   * [[::​developingpld|Developing PLD Linux]] ​
Line 40: Line 36:
  
  
-<​file>​xprop -id $WINDOWID -notype WM_LOCALE_NAME+<​file ​bash>xprop -id $WINDOWID -notype WM_LOCALE_NAME
 </​file>​ </​file>​
  
Line 46: Line 42:
 ===== Detect PuTTY ===== ===== Detect PuTTY =====
  
- +<​file ​bash xterm-249/​vttests/​title.sh>
-<file># xterm-249/​vttests/​title.sh+
 old=$(stty -g) old=$(stty -g)
 stty raw -echo min 0 time 5 stty raw -echo min 0 time 5
Line 76: Line 71:
  
  
-<​file>​keychain -q --agents gpg+<​file ​bash> 
 +keychain -q --agents gpg
 if [ -f ~/​.keychain/​$HOSTNAME-sh-gpg ]; then if [ -f ~/​.keychain/​$HOSTNAME-sh-gpg ]; then
   . ~/​.keychain/​$HOSTNAME-sh-gpg   . ~/​.keychain/​$HOSTNAME-sh-gpg
Line 132: Line 128:
 for example my ''​~/​.bash_profile''​ on [[:​machines:​carme|carme]] contains: ​ for example my ''​~/​.bash_profile''​ on [[:​machines:​carme|carme]] contains: ​
  
-<​file>#​ force screen utf8 encoding+<​file ​bash> 
 +# force screen utf8 encoding
 if [[ "​$TERM"​ = screen* ]]; then if [[ "​$TERM"​ = screen* ]]; then
   echo -ne '​\033]83;​encoding utf8\007'​   echo -ne '​\033]83;​encoding utf8\007'​
Line 143: Line 140:
  
  
-<​file>#​ the server name is bogus actually, to satisfy mod_fastcgi+<​file ​apache> 
 +# the server name is bogus actually, to satisfy mod_fastcgi
 FastCgiExternalServer /bin/true -socket /​var/​run/​php/​fcgi.sock FastCgiExternalServer /bin/true -socket /​var/​run/​php/​fcgi.sock
 ScriptAlias /php-fcgi /bin/true ScriptAlias /php-fcgi /bin/true
Line 239: Line 237:
 now remove the old disk and voila! ​ now remove the old disk and voila! ​
  
-===== PLD Linux VirtualBox ​images ===== +===== PLD Linux VM images =====
- +
-I've created PLD VirtualBox images, exported into [[wp>​Open Virtualization Format|OVA (Open Virtualization Archive)]] format +
- +
-  * ftp://​ftp.pld-linux.org/​people/​glen/​vm/​+
  
 +See [[.:​glen:​vm-info]] for more details
 ===== Upgrading PHP 5.3 -> PHP 5.4 ===== ===== Upgrading PHP 5.3 -> PHP 5.4 =====
  
Line 261: Line 256:
 You should start the script at startup of your X session. You should start the script at startup of your X session.
  
-<code bash ~/​.local/​bin/​dropbox-watch.sh>​ +<code bash ~/​.local/​bin/​dropbox-watch.sh>#​!/​bin/​sh
-#!/bin/sh+
 # A script that watches ~/​Pictures/​Screenshots dir, and any new file is added there, it # A script that watches ~/​Pictures/​Screenshots dir, and any new file is added there, it
 # is renamed so it would contain filename modify timestamp (uses safe # is renamed so it would contain filename modify timestamp (uses safe
Line 271: Line 265:
 # Author: Elan Ruusamäe <​glen@delfi.ee>​ # Author: Elan Ruusamäe <​glen@delfi.ee>​
 # Date: 2012-11-09 # Date: 2012-11-09
 +# Updated: 2014-07-22 (test all tools, more filename filters)
  
 watchdir=$HOME/​Pictures/​Screenshots watchdir=$HOME/​Pictures/​Screenshots
Line 277: Line 272:
  
 # Config # Config
-dropdir=$HOME/​Dropbox/​Public +dropdir=$HOME/​Dropbox/​Public/ss 
-dropuser=YOUR_DROPBOX_NUMERIC_USER_ID +dropuser=YOUR_DROPBOX_NUMERIC_USER_ID  
-dropurl=https://​dl.dropbox.com/​u/​$dropuser/​ss+dropurl=https://​dl.dropboxusercontent.com/​u/​$dropuser/​ss
  
 if [ ! -d $dropdir ]; then if [ ! -d $dropdir ]; then
  echo >&2 "​Dropbox dir $dropdir missing!"​  echo >&2 "​Dropbox dir $dropdir missing!"​
 + exit 1
 +fi
 +
 +if [ ! -d $watchdir ]; then
 + echo >&2 "Watch dir $watchdir missing!"​
 + exit 1
 +fi
 +
 +if ! which $viewer 2>/​dev/​null;​ then
 + echo >&2 "​Can'​t find viewer: $viewer"​
 + exit 1
 +fi
 +
 +if ! which inotifywait 2>/​dev/​null;​ then
 + echo >&2 "​Can'​t find tool: inotifywait,​ install inotify-tools"​
 + exit 1
 +fi
 +
 +if ! which notify-send 2>/​dev/​null;​ then
 + echo >&2 "​Can'​t find tool: notify-send,​ install libnotify"​
  exit 1  exit 1
 fi fi
Line 297: Line 312:
  # reformat filename so it woult be nice url  # reformat filename so it woult be nice url
  mtime=$(stat -c "​%y"​ "​$file"​)  mtime=$(stat -c "​%y"​ "​$file"​)
- filename=$(date -d "​$mtime"​ '​+%Y-%m-%d_%H.%M.%S'​).png+ # Strip '​Screenshot - 04062013 - 11:30:49 AM.png'​ 
 + # strip '​Screenshot - 14.01.2013 - 15:​04:​02',​ and leave everything else part of the filename 
 + fn=$(echo "​$filename"​ | sed -e '​s,​^Screenshot - [ .:​0-9-]*[AP]M,,'​) 
 + # Strip '​Screenshot from 2013-02-13 23:​49:​07'​ 
 + # Strip '​Screenshot - 30.05.2013 - 11:​48:​58.png'​ 
 + fn=$(echo "​$fn"​ | sed -re '​s,​^Screenshot( from)? [ .:​0-9-]*,,'​) 
 + 
 + # sanitize exts 
 + fn=$(echo "​$fn"​ | sed -re '​s/​\.?​(jpe?​g|png)$//'​ -e 'y/ /​_/'​) 
 + filename=$(date -d "​$mtime"​ '​+%Y-%m-%d_%H.%M.%S'​)${fn:+-$fn}.png 
 + 
 + # bugfixes 
 + fn=$(echo "​$fn"​ | sed -re '​s/​\.png\.png$/​.png/'​)
  
  url="​$dropurl/​$filename"​  url="​$dropurl/​$filename"​
Line 311: Line 338:
 </​code>​ </​code>​
  
 +===== PLD svn and Subversion under ac =====
 +
 +[[/​AcInfo|Ac]] has old openssl that can't do [[wp>​Server Name Indication|SNI]] properly, therefore accessing svn over https gives errors:
 +
 +<​file>​
 +svn: OPTIONS of '​https://​....':​ Certificate verification error: certificate signature failure (https://​svn.pld-linux.org)
 +</​file>​
 +
 +A [[http://​jamescrisp.org/​2010/​06/​05/​workaround-for-subversion-svn-certificate-verification-error-insecure-algorithm-on-ubuntu-1004-lucid-lynx/​|Workaround]] possible:
 +<code config ~/​.subversion/​servers>​
 +[groups]
 +pld = svn.pld-linux.org
 +
 +[pld]
 +ssl-trust-default-ca = no
 +</​code>​
people/glen.txt · Last modified: 2016-01-16 09:33 by glen