Wednesday, November 13, 2013
Sunday, October 27, 2013
Blogging from emacs org-mode
Blogging
README
- These are some setup files for blogging to blogger.com from emacs org-mode
- My .emacs.d/ setup for context https://github.com/eludom/dotfiles/tree/master/.emacs.d
Atom blogging via BPE
BPE Installation
DONE Install Google Client commandline/API tools
On Ubuntu try
sudo apt-get install googlecl
DONE Insall g-client emacs interface
DONE Configure package
For me this looked like
cd ~src
bzunzip2 g-client.tar.bz2
tar -xvf g-client.tar
cd src/g-client
make config
make
DONE install BPE form packages
BPE configuraiton code
; set up emacs interface to googlecl
(add-to-list 'load-path "~/src/g-client" t)
(load-library "g")
; setup bpe
(require 'bpe)
(require 'htmlize nil 'noerror) ; to fontify source code block on your blog.
(setq bpe:account "yourUsername@gmail.com")
(setq bpe:blog-name "yourBlogname")
(define-key org-mode-map (kbd "C-c C-p") 'bpe:post-article)
(define-key org-mode-map (kbd "C-c C-i") 'bpe:insert-template)
;; For Japanese, default is $LANG environment variable.
;(setq bpe:lang "ja_JP.UTF-8")
BPE posting
- open an .org file
- C-c C-i to insert a template
- write the post
- C-c C-p to posts
- posts as draft
- bug: have to insert a " tagname" after "#+TAG:" in template.
Wordpress blogging
Wordpress configuration code
(setq load-path (cons "~/.emacs.d/elpa/org2blog-20130704.908/" load-path))
(require 'org2blog-autoloads)
(setq org2blog/wp-blog-alist
'(("wordpress"
:url "http://yourUsername.wordpress.com/xmlrpc.php"
:username "yourUsername"
:default-title "Goodbye World"
:default-categories ("org2blog" "emacs")
:tags-as-categories nil)
("food8forthought"
:url "http://yourUsername.wordpress.com/xmlrpc.php"
:username "yourUsername"
:default-title "Set a title next time"
:default-categories ("word" "vi")
:tags-as-categories nil)
))
(message "blogging.org finished.")
Monday, October 21, 2013
Blogging fom org-mode
What this is
- These are some setup files for blogging to blogger.com from emacs org-mode
- This is an orgified version of my ~/.emacs.d/30-bloging.org
- My .emacs.d/ setup for context https://github.com/eludom/dotfiles/tree/master/.emacs.d
Blogging setup and TODO list
DONE Install Google Client
- Google Client
- http://www.emacswiki.org/emacs/GoogleClient
- g-client setup
- http://emacspeak.blogspot.com/2007/03/emacs-client-for-google-services.html
- g-cus-load.el missing
- http://emacsgeek.blogspot.com/
DONE install bpe from packages
TODO Post this to usefulfoo blog
TODO Set up Org2BlogAtom http://www.emacswiki.org/emacs/Org2BlogAtom
The Code
; google services setup (add-to-list 'load-path "~/.emacs.d/g-client" t) (load-library "g") (message "blogging.org finished.")
Sunday, October 6, 2013
Automatic screen locking on XFCE/Security Onion
Screen Locking on XFCE
This may be old-school, but I like to have X screen locking. It does not come by default on XFCE and, by extension on Security OnionTo get it working, I did the following:
apt-get install xautolockCreated
~/.config/autostart/runXinitrc.desktop with the following content[Desktop Entry] Version=1.0 Name=Script Type=Application Exec=/ASOLUTE/PATH/TO/HOME/.xinitrc Terminal=false StartupNotify=false Hidden=falseCreated
.xinitrc with the following content:xautolock -time 15 -locker /usr/bin/xflock4 &And, as an added bonus, for those who want the control key to the left of
A where God and Richard Stallman intended it, create ~/.config/autostart/ with the following (change Exec location to suit):[Desktop Entry] Version=1.0 Name=Script Type=Application Exec=/ASOLUTE/PATH/TO/HOME/bin/fixctrl.sh Terminal=false StartupNotify=false Hidden=falseand finally, create
/ASOLUTE/PATH/TO/HOME/bin/fixctrl.sh with:setxkbmap -option 'ctrl:nocaps'…yes, there are probably better, simpler ways to do all this…
Thursday, October 3, 2013
Wednesday, October 2, 2013
Saturday, June 29, 2013
How retro can I go? Sketchnotes: visual thinking on paper.
In the possiblyUsefulFoo category
http://www.core77.com/blog/sketchnotes/sketchnotes_101_the_basics_of_visual_note-taking_19678.asp
I'm already using a 35-year-old text editor (emacs, org-mode) for most of my thinking and
writing. Why not go even more retro?
http://www.core77.com/blog/sketchnotes/sketchnotes_101_the_basics_of_visual_note-taking_19678.asp
I'm already using a 35-year-old text editor (emacs, org-mode) for most of my thinking and
writing. Why not go even more retro?
Thursday, June 20, 2013
This is more "amusingfoo" than "usefulfoo"
Unix tool tip (@UnixToolTip) tweeted at 9:24 AM on Thu, Jun 20, 2013:
Emacs unfill-paragraph and unfill-region http://t.co/Q9zXOJ86X4
(https://twitter.com/UnixToolTip/status/347706446848356353)
Get the official Twitter app at https://twitter.com/download
Wednesday, June 19, 2013
Adding new Mac OSX keyboard shortcuts
No default keyboard shortcut for "maximize window" (Zoom). Sheesh.
And, of course, Emacs does not honor it even when defined.
http://osxdaily.com/2013/03/22/5-simple-window-management-keyboard-shortcuts-to-improve-workflow-in-mac-os-x/
And, of course, Emacs does not honor it even when defined.
http://osxdaily.com/2013/03/22/5-simple-window-management-keyboard-shortcuts-to-improve-workflow-in-mac-os-x/
Monday, June 17, 2013
Tuesday, May 21, 2013
Saturday, May 18, 2013
Saturday, May 11, 2013
Deep magic from the before the dawn of time
If you ever found yourself wanting to execute a sudo(1) command from within block of shell code in a org-bable source code block on a linux system (sure, happens all the time, right?), here's the deep foo to solve the password prompting quandry:
Sylvain Rousseau | 4 Mar 2012 18:29 Re: Is it possible to run shell script src blocks as root or to export individual blocks? Under Gnome, I'm using this at the beginning of a sh source block: echo -e "#! /bin/bash\n/usr/bin/gksudo -p -m Password" > /tmp/gksudo-stdout chmod +x /tmp/gksudo-stdout SUDO_ASKPASS="/tmp/gksudo-stdout" sudo -A -s Sylvain.
http://comments.gmane.org/gmane.emacs.orgmode/52979
Subscribe to:
Comments (Atom)