Skip to content

Instantly share code, notes, and snippets.

View antonj's full-sized avatar

Anton Johansson antonj

View GitHub Profile

Keybase proof

I hereby claim:

  • I am antonj on github.
  • I am antonj (https://keybase.io/antonj) on keybase.
  • I have a public key ASA6OkrleyAuX7M64A_q_keJfYnkqmM2amlEKOQ8mY-4mAo

To claim this, I am signing this object:

tell application "Finder"
set aList to every file of entire contents of (choose folder with prompt "Please select directory.") whose name extension is "graffle"
-- set folderPath to POSIX path of (name of container of aFile)
(*
set aFolder to (choose folder with prompt "Please choose a file name")
set aList to items of aFolder whose name extension is "graffle"
*)
log aList
source 'https://rubygems.org'
group :development do
gem 'guard-shell'
gem 'guard-sass'
gem 'guard-livereload'
gem 'coderay'
gem 'kramdown'
end
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(window).on('keyup', function(e) {
console.log(e.keyCode);
if (e.keyCode == 49) {
console.log('addclass');
$('#wrapper').attr('class', 'desktop');
* {
margin: 0px;
padding: 0px;
}
ul, ol, dl, li, dt, dd, h1, h2, h3, h4, h5, h6, pre, form, body, html, p, blockquote, fieldset, input {
margin: 0;
padding: 0;
color: inherit;
font-family: inherit;
font-size: inherit;
@antonj
antonj / hindent-minor-mode.el
Created January 28, 2012 11:04 — forked from krestenkrab/hindent.el
hindent.el: Highlight indentation of current line
;;;
;;; Copyright (C) Kresten Krab Thorup
;;; Available under Apache License, Version 2.
;;;
;;;
;;; This minor mode will highlight the indentation of the current line
;;; as a vertical bar (grey background color) aligned with the column of the
;;; first character of the current line.
;;;
@antonj
antonj / flymake-eclim-java.el
Created September 18, 2011 12:26
Flymake emacs-eclim java project
;; (require 'flymake)
(defvar flymake-eclipse-batch-compiler-path
"/Applications/eclipse/plugins/org.eclipse.jdt.core_3.7.0.v_B61.jar")
;; TODO fix hardcoded 1.6
(defvar flymake-java-version "1.6")
(defun flymake-java-ecj-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-ecj-create-temp-file))
@antonj
antonj / aj-toggle-fold.el
Created March 17, 2011 10:17
Emacs command to toggle folding of all lines with indentation larger than that on the current line.
(defun aj-toggle-fold ()
"Toggle fold all lines larger than indentation on current line"
(interactive)
(let ((col 1))
(save-excursion
(back-to-indentation)
(setq col (+ 1 (current-column)))
(set-selective-display
(if selective-display nil (or col 1))))))
(global-set-key [(M C i)] 'aj-toggle-fold)