Skip to content

Instantly share code, notes, and snippets.

View thomasf's full-sized avatar

Thomas Frössman thomasf

View GitHub Profile
@thomasf
thomasf / nginx.conf
Created May 20, 2015 09:58
nginx write request body
server {
listen 80;
listen [::]:80;
server_name somedomain;
location /applogger {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
(use-package go-mode
:ensure t
:mode "\\.go\\'"
:config
(progn
(defun gopath-set-here ()
(interactive)
(message (or (buffer-file-name) default-directory))
(setenv "GOPATH"
@thomasf
thomasf / cursor-style.el
Created August 3, 2014 10:30
cursor-style.el
(defvar my-normal-cursor-type 'bar)
(defun cursor-style-update-action ()
(when (bound-and-true-p cua-normal-cursor-color)
(let* ((current-cursor-color (cdr (assq 'cursor-color (frame-parameters))))
(cursor-style (cond
((bound-and-true-p region-bindings-mode) (cons "#d33682" '(bar . 8)))
((bound-and-true-p god-local-mode) (cons "#268bd2" 'box))
((bound-and-true-p buffer-read-only) (cons "#859900" '(hbar . 4)))
(t (cons cua-normal-cursor-color my-normal-cursor-type)))))