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
;; Add this code to your .emacs file so it will be loaded at start, after installing ghc-mod | |
;; This code checks the parent folders of new haskell buffers to see if they contain .cabal | |
;; files. If so, it changes the working directory of the buffer to point to that directory. | |
(defun change-to-cabal-directory () | |
(if (buffer-file-name) | |
(change-to-cabal-directory-from-directory (file-name-directory buffer-file-name)))) | |
(defun change-to-cabal-directory-from-directory (directory) |
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
on run argv | |
set defaultTime to 1 | |
try | |
set myTime to item 1 of argv as number | |
set myDelay to 0 | |
on error | |
display dialog "Enter time to block in minutes" default answer 180 | |
set myTime to (text returned of result) as number | |
display dialog "After how much time" default answer 30 |
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
var JQuerySlide = React.createClass({ | |
componentWillEnter: function(callback){ | |
var $el = $(this.getDOMNode()) | |
$el.slideDown(function(){ | |
callback(); | |
}); | |
}, | |
componentWillLeave: function(callback){ | |
var $el = $(this.getDOMNode()); | |
$el.slideUp(function(){ |
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
State Cost Population Cost/Pop | |
PR $37,712,132.94 601,723 $62.67 | |
DC $21,741,478.09 646,449 $33.63 | |
GU $5,466,524.59 159,358 $34.30 | |
AL $117,321,970.75 4,779,736 $24.55 | |
DE $12,483,178.35 897,934 $13.90 | |
TN $88,036,810.05 6,346,105 $13.87 | |
FL $252,801,365.49 18,801,310 $13.45 | |
NM $25,077,905.94 2,059,179 $12.18 | |
SC $49,446,894.25 4,625,364 $10.69 |
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
// Workaround for https://github.com/highslide-software/highcharts.com/issues/3385 | |
// Uses default bootstrap media query sizes. | |
// display_heatmap is a function that displays the heatmap once the map data has been downloaded. | |
// Requires enquire.js (http://wicky.nillia.ms/enquire.js/) | |
// Download map data and save the jqXHR promise. | |
var states_promise = jQuery.getJSON('http://blog.statricks.com/media/system/maps/US.min.json', {}); | |
// Use enquire to re-render the heatmap if we change browser width |
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
(flycheck-define-checker python-prospector | |
"A Python syntax and style checker using Prospector. | |
See URL `http://prospector.readthedocs.org/en/latest/index.html'." | |
:command ("prospector" "-s" "medium" "-M" "-o" "emacs" | |
source) | |
:error-patterns | |
((error line-start | |
(file-name) ":" (one-or-more digit) " :" (optional "\r") "\n" | |
(one-or-more " ") "L" line ":" column | |
(message (minimal-match (one-or-more not-newline)) "E" (one-or-more digit) (optional "\r") "\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
(setq rainbow-identifiers-faces-to-override (default font-lock-variable-name-face)) | |
(defun rainbow-identifiers-face-overridable (begin end) | |
"Test if all the faces under the identifier are overridable." | |
(let ((current begin) | |
(contains-non-default nil)) | |
(catch 'rainbow-identifiers--face-overridable | |
(while (progn | |
(let ((face (get-text-property current 'face))) | |
; In PHP function names have no style |
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 erlang-calculate-stack-indent (indent-point state) | |
"From the given last position and state (stack) calculate indentation. | |
Return nil if inside string, t if in a comment." | |
(let* ((stack (and state (car state))) | |
(token (nth 1 state)) | |
(stack-top (and stack (car stack)))) | |
(cond ((null state) ;No state | |
0) | |
((nth 3 state) | |
;; Return nil or 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
# This information was impossible to find | |
brew install cgal | |
brew install swig | |
git clone https://github.com/CGAL/cgal-swig-bindings.git | |
cd cgal-swig-bindings | |
# Replace the python paths below with the correct version for your system | |
cmake -DCGAL_DIR=/usr/local/lib/CGAL \ |