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 count-todos-in-buffer () | |
(interactive) | |
(save-excursion | |
(goto-char (point-min)) | |
(message "Number of TODO's in the current buffer: %d" (count-matches "TODO")))) | |
(set-key "<C-f7>" 'count-todos-in-buffer) |
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 set-key (kbd funct) | |
(global-set-key (read-kbd-macro kbd) funct)) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; find-file-in-project | |
(defvar rinari-project-files-table ()) | |
(defun populate-project-files-table (file) | |
(if (file-directory-p file) | |
(mapc 'populate-project-files-table (directory-files file t "^[^\.]")) | |
(let* ((file-name (file-name-nondirectory file)) | |
(existing-record (assoc file-name project-files-table)) |
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 ido-goto-symbol () | |
"Will update the imenu index and then use ido to select a symbol to navigate to" | |
(interactive) | |
(imenu--make-index-alist) | |
(let ((name-and-pos '()) | |
(symbol-names '())) | |
(flet ((addsymbols (symbol-list) | |
(when (listp symbol-list) | |
(dolist (symbol symbol-list) | |
(let ((name nil) (position nil)) |
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
self.content = (0..([ outcome_list_home.size, outcome_list_draw.size, outcome_list_away.size ].max - 1)).collect do |i| | |
[outcome_list_home[i], outcome_list_draw[i], outcome_list_away[i]].collect do |outcome| | |
[ | |
(outcome[:outcomeDescription] rescue nil), | |
(ABP::Model::Price.new( | |
:website => params[:website], | |
:language => params[:language], | |
:outcome_description => outcome[:outcomeDescription], | |
:outcome_id => outcome[:outcomeId], | |
:decimal => outcome[:priceEuro], |
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
# Blender3D v245 OBJ File: untitled.blend | |
# www.blender3d.org | |
mtllib cube_Scene.mtl | |
o Cube_Cube.002 | |
v 2.290376 0.771969 -0.116364 | |
v 1.495346 -0.947306 0.525523 | |
v 0.414982 -1.074310 -1.152775 | |
v 1.210012 0.644966 -1.794661 | |
v 0.806887 1.785853 0.761873 | |
v 0.011857 0.066577 1.403759 |
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
(require 'emms-player-simple) | |
(defcustom emms-player-rhythmbox (emms-player 'emms-player-rhythmbox-start | |
'emms-player-rhythmbox-stop | |
'emms-player-rhythmbox-playable-p)) | |
(defun emms-rhythmbox-dbus-call-player (method &rest args) | |
(apply 'dbus-call-method :session "org.gnome.Rhythmbox" "/org/gnome/Rhythmbox/Player" "org.gnome.Rhythmbox.Player" method args)) | |
(defun emms-rhythmbox-dbus-play-pause () |
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
(define-syntax define-page | |
(syntax-rules () | |
((_ name title headers body ...) (define (name #!rest params) | |
(let ([post-data (process-request)]) | |
(let ([form-data (if post-data | |
(append post-data params) | |
params)]) | |
(html-body name | |
(lambda () | |
body ...) headers))))) |
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
(use spiffy awful html-tags sql-de-lite) | |
(include "src/config") | |
(include "src/blog_model") | |
(web-repl-access-control | |
(lambda () | |
(member (remote-address) '("127.0.0.1")))) | |
(enable-web-repl "/repl") |
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
(defmacro maybe-require (package &optional body) | |
"Tries to load the specified package. If it succeeds, then body is executed (if provided)." | |
(if body | |
`(lambda () | |
(require ,package nil t) | |
(if (featurep ,package) | |
,@body)) | |
`(require ,package nil t))) |
OlderNewer