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-skeleton hook-views-api-skel | |
"Inserts a hook_views_api template in the current buffer." | |
nil | |
> "/**" \n | |
> -2 "* Implementation of hook_views_api().\n" | |
> "*/" \n | |
> "function " (setq v1 (skeleton-read "Module name: ")) "_views_api() {" \n | |
> "return array(" \n | |
> "'api' => " (setq v2 (skeleton-read "API version: ")) | "2" "," \n | |
> "'path' => drupal_get_path('module', '" v1 "') . " (setq v2 (skeleton-read "Path: ")) | "'/includes/views'" "," \n |
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 is taken from planet Emacsen: http://tsengf.blogspot.com/2011/06/prevent-accidental-iconify-of-emacs.html. | |
;;; I've added a check to see if we're on a graphic environment. | |
;;; Prevent acidental iconify/suspend. | |
(when (window-system) | |
(defun smart-iconify-or-deiconify-frame () | |
"Present a confirmation before suspending/iconifying." | |
(interactive) | |
(if (yes-or-no-p (format "Are you sure you want to iconify/deiconify Emacs? ")) | |
(iconify-frame))) |
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
kernel: \[[[:digit:]]+\.[[:digit:]]+\] psmouse\.c: TouchPad at isa[[:digit:]]+/serio[[:digit:]]/input[[:digit:]] lost sync.* | |
kernel: \[[[:digit:]]+\.[[:digit:]]+\] psmouse\.c: issuing reconnect request | |
kernel: \[[[:digit:]]+\.[[:digit:]]+\] psmouse\.c: TouchPad at isa[[:digit:]]+/serio[[:digit:]]/input[[:digit:]] - driver resynched |
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 should be the first location in yout config. | |
location ~* \.(?:gif|html|jpe?g|png|ico|js|css|flv|swf|pdf|xml)$ { | |
(...) | |
# serve static files | |
} | |
# Put all other locations below | |
location / { | |
(...) # more stuff | |
} |
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
;;; Clean up the current buffer: indent it, remove tabs and delete the | |
;;; trailing whitespace. | |
(defun tidy-up-buffer () | |
" Do a cleanup of the current buffer: tabs, spaces and indent | |
it." | |
(interactive) | |
(indent-buffer) | |
(delete-trailing-whitespace) | |
(untabify-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
;;; This is to enable ronn files https://github.com/rtomayko/ronn to be treated as markdown files. | |
(add-to-list 'auto-mode-alist '("\\.ronn$" . markdown-mode)) |
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
[general] | |
fontname=Terminus 9 | |
selchars=-A-Za-z0-9,./?%&#:_ | |
scrollback=0 | |
bgcolor=#00002b2b3636 | |
bgalpha=65535 | |
fgcolor=#65657b7b8383 | |
disallowbold=false | |
cursorblinks=false | |
cursorunderline=false |
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
#Apache httpd Remote Denial of Service (memory exhaustion) | |
#By Kingcope | |
#Year 2011 | |
# | |
# Will result in swapping memory to filesystem on the remote side | |
# plus killing of processes when running out of swap space. | |
# Remote System becomes unstable. | |
# | |
use IO::Socket; |
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
## BEAST http://vnhacker.blogspot.com/2011/09/beast.html SSL vuln server side workaround. | |
## This will break IE6 and below SSL handling. Works in all other browsers. Grabbed from: | |
## http://mailman.nginx.org/pipermail/nginx-devel/2011-October/001311.html. | |
ssl_ciphers RC4:HIGH:!aNULL:!MD5; | |
ssl_prefer_server_ciphers on; |
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
## Declare cache zone. | |
fastcgi_cache_path /opt/local/var/cache/nginx levels=1:2 keys_zone=microcache:5m max_size=1G; | |
map $http_cookie $no_cache { | |
default 0; | |
~_mcnc 1; | |
} | |
server { |
OlderNewer