This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; anything-mac-itunes.el --- Use iTunes on Mac with anything.el | |
;; Copyright (C) 2010 Hiroshige Umino | |
;; Author: Hiroshige Umino <yaotti@gmail.com> | |
;; Created: 2010-11-24 | |
;; Version: 0.0.1 | |
;; | |
;; Keywords: anything, mac | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; cfw:howm-from-calendar-fast | |
(defun cfw:howm-from-calendar-fast () | |
(interactive) | |
(let* ((mdy (cfw:cursor-to-nearest-date)) | |
(m (calendar-extract-month mdy)) | |
(d (calendar-extract-day mdy)) | |
(y (calendar-extract-year mdy)) | |
(key (format-time-string | |
howm-date-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"twitpic": { | |
"url": "^http://twitpic\\.com/[a-zA-Z0-9]+", | |
"attribute": { | |
"id": "photo-display" | |
} | |
}, | |
"yfrog": { | |
"url": "^http://yfrog\\.com/[a-zA-Z0-9]+", | |
"attribute": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"twitpic": { | |
"url": "^http://twitpic\\.com/[a-zA-Z0-9]+", | |
"attribute": { | |
"id": "photo-display" | |
} | |
}, | |
"yfrog": { | |
"url": "^http://yfrog\\.com/[a-zA-Z0-9]+", | |
"attribute": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy from https://gist.github.com/1203094 | |
// gcc -o dict -Wall -fobjc-gc -O2 -std=c99 dict.m -framework carbon -framework cocoa | |
#import <Cocoa/Cocoa.h> | |
#import <CoreServices/CoreServices.h> | |
int main(int argc, char *argv[]) | |
{ | |
NSString *word; | |
NSString *result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun anything-org-todo-list (arg) | |
(interactive "P") | |
(org-compile-prefix-format 'todo) | |
(org-set-sorting-strategy 'todo) | |
;;(org-prepare-agenda "TODO") | |
(if (and (stringp arg) (not (string-match "\\S-" arg))) (setq arg nil)) | |
(let* ((today (time-to-days (current-time))) | |
(date (calendar-gregorian-from-absolute today)) | |
(kwds org-todo-keywords-for-agenda) | |
(completion-ignore-case t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#speaker-note { | |
position:absolute; | |
left: 0; | |
top: 80%; | |
width: 100%; | |
height: 20%; | |
z-index: 8; | |
opacity: 0.75; | |
background-color: white; | |
overflow: auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This function is quoted from this page. Thanks to Tomohiro Matsuyama. | |
;; http://dev.ariel-networks.com/Members/matsuyama/pretty-lambda-in-emacs/ | |
(defun set-pretty-patterns (patterns) | |
(loop for (glyph . pairs) in patterns do | |
(loop for (regexp . major-modes) in pairs do | |
(loop for major-mode in major-modes do | |
(let ((major-mode (intern (concat (symbol-name major-mode) "-mode"))) | |
(n (if (string-match "\\\\([^?]" regexp) 1 0))) | |
(font-lock-add-keywords major-mode | |
`((,regexp (0 (prog1 () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A generic confirmation for risky actions. | |
* Usage: Add attributes: ng-really-message="Are you sure?" ng-really-click="takeAction()" ng-really-cancel-click="cancelAction()" function | |
*/ | |
angular.module('app').directive('ngReallyClick', [function() { | |
return { | |
restrict: 'A', | |
link: function(scope, element, attrs) { | |
element.bind('click', function() { | |
var message = attrs.ngReallyMessage; |
OlderNewer