Skip to content

Instantly share code, notes, and snippets.

;;; dot.wl -- sample setting file for Wanderlust -*- emacs-lisp -*-
(setq elmo-imap4-default-server "imap.gmail.com"
elmo-imap4-default-user "holtzermann17@gmail.com"
elmo-imap4-default-authenticate-type 'clear
elmo-imap4-default-port '993
elmo-imap4-default-stream-type 'ssl
elmo-imap4-use-modified-utf7 t
@holtzermann17
holtzermann17 / README
Created June 28, 2011 16:36
Drupal Migration
These files import ONE database table (users) into Drupal.
Some key issues to note for the record:
* getting the name of the hook right in planetmath.module
(it should be MODULENAME_migrate_api).
* make sure to clear the cache after the module is
imported (drush cc all). This should help identify any
coding errors!
@holtzermann17
holtzermann17 / gist:1063793
Created July 4, 2011 19:06
comment migration
class PMCommentMigration extends PMMigration {
public function __construct() {
parent::__construct();
$this->description = t('PM Comment data');
// PMUser and PMObject (at least) should run first.
// The reason for saying "at least" is that many
// comments are attached to forums which won't exist
// in advance unless we load them.
// HOWEVER commenting this out for now...
@holtzermann17
holtzermann17 / gist:1070136
Created July 7, 2011 18:11
Recent Comments view for PlanetMath in Drupal
$view = new view;
$view->name = 'comments_recent';
$view->description = 'Contains a block and a page to list recent comments; the block will automatically link to the page, which displays the comment body as well as a link to the node.';
$view->tag = 'default';
$view->base_table = 'comment';
$view->human_name = 'Recent comments';
$view->core = 0;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@holtzermann17
holtzermann17 / gist:1070236
Created July 7, 2011 18:48
PlanetMath about
PlanetMath is a virtual community which aims to help make mathematical knowledge more accessible. PlanetMath's content is created collaboratively: the main feature is the mathematics encyclopedia with entries written and reviewed by members. The entries are contributed under the terms of the <a href="http://creativecommons.org/licenses/by-sa/2.0/">Creative Commons By/Share-Alike License</a> in order to preserve the rights of authors, readers and other content creators in a sensible way.
You are currently browsing a port of PlanetMath's content into Drupal, which is being developed as part of the <a href="http://trac.mathweb.org/planetary">Planetary project</a>.
@holtzermann17
holtzermann17 / gist:1366558
Created November 15, 2011 09:32
logs from standard etherpad client connection
[2011-11-15 09:22:05.814] [INFO] console - Your Etherpad Lite git version is fb158d2
[2011-11-15 09:22:05.821] [INFO] console - Report bugs at https://github.com/Pita/etherpad-lite/issues
[2011-11-15 09:22:07.666] [INFO] console - Server is listening at 0.0.0.0:9001
[2011-11-15 09:22:07.668] [INFO] console - info -'socket.io started'
[2011-11-15 09:22:24.805] [INFO] http - 304, GET /p/test
[2011-11-15 09:22:24.826] [INFO] http - 304, GET /static/css/pad.css
[2011-11-15 09:22:24.834] [INFO] http - 304, GET /static/custom/pad.js
[2011-11-15 09:22:24.835] [INFO] http - 304, GET /static/custom/pad.css
[2011-11-15 09:22:25.019] [DEBUG] socket.io - served static content /socket.io.js
[2011-11-15 09:22:29.262] [INFO] http - 200, GET /minified/pad.js
@holtzermann17
holtzermann17 / gist:1392143
Created November 24, 2011 19:49
view for getting user points out of drupal
$view = new view;
$view->name = 'userpoints';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'userpoints_txn';
$view->human_name = 'Userpoints';
$view->core = 7;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@holtzermann17
holtzermann17 / og-config.php
Created June 18, 2012 14:19
OG configuration (drop in devel/php)
$og_field = og_fields_info(OG_AUDIENCE_FIELD);
$og_field['field']['settings']['target_type'] = 'node';
$og_field['instance']['settings']['behaviors']['prepopulate'] = array(
'status' => TRUE,
'action' => 'none',
'fallback' => 'none',
'skip_perm' => FALSE,
);
og_create_field(OG_AUDIENCE_FIELD, 'node', 'article', $og_field);
@holtzermann17
holtzermann17 / post-profile-og
Created July 15, 2012 17:31
Configuration steps needed post-profile
$og_field = og_fields_info(OG_AUDIENCE_FIELD);
$og_field['field']['settings']['target_type'] = 'node';
$og_field['instance']['settings']['behaviors']['prepopulate'] = array(
'status' => TRUE,
'action' => 'none',
'fallback' => 'none',
'skip_perm' => FALSE,
);
og_create_field(OG_AUDIENCE_FIELD, 'node', 'article', $og_field);
File: `~/.gtkrc-2.0`
```
include "/usr/share/themes/Emacs/gtk-2.0-key/gtkrc"
```
Some things don't work quite the way you want them to, "`Ctrl-k`" in particular is pretty vital. You'll need this [extension](https://addons.mozilla.org/en-us/firefox/addon/change-search-shortcut/). (Actually, you need to install version .1 from the [back catalog](https://addons.mozilla.org/en-us/firefox/addon/change-search-shortcut/versions/).)
`Alt-b` and `Alt-f` are also pretty vital. I found the best way to make them work was to edit the toolbar layout, and remove *F*ile and *B*ookmarks from the menu. It's also convenient to hide the menu (but you have to remove these or they'll be pulled up despite being hidden).
Even after all the effort to set up functional Emacs keys, it's a plus to have It's All Text installed. ([Extension](https://addons.mozilla.org/en-us/firefox/addon/its-all-text/)). To configure: put this into `~/bin/ecw` and set that as the Editor.
```