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 org-read-structure-template () | |
"Read org-mode structure template with completion. Returns template string." | |
(let* ((templates (map 'list 'second org-structure-template-alist)) | |
(prefixes (map 'list (lambda (tp) | |
;; Get template and pre-whitespace prefix for completion | |
(reverse (s-match (rx (group | |
(1+ (not (any "\n" space)))) | |
(1+ anything)) | |
tp))) | |
templates)) |
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
; accrual basis accounting | |
2016/2/1 * (201602ab) ab client invoice | |
revenues:business:consulting:ab $-1000 | |
assets:business:accounts receivable:ab $1000 | |
; or, | |
; cash basis accounting doesn't include invoices, but use an unbalanced posting to track it anyway | |
2016/2/1 * (201602ab) ab client invoice | |
(assets:business:accounts receivable:ab) $1000 |
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
#SevillaR talk | |
#The problem: | |
time <- c(2000:2015) | |
abundance <- rnorm(16, 150, 50) #poison?? | |
plot(abundance ~ time, t = "l") | |
#can I detect a trend? |
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
#!/usr/bin/Rscript --vanilla | |
########################################################### | |
## ## | |
## elastic.R ## | |
## ## | |
## Author: Tony Fischetti ## | |
## tony.fischetti@gmail.com ## | |
## ## | |
########################################################### |
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
ghelp <- function(topic, in_cran=TRUE) { | |
require(htmltools) # for getting HTML to the viewer | |
require(rvest) # for scraping & munging HTML | |
# github search URL base | |
base_ext_url <- "https://github.com/search?utf8=%%E2%%9C%%93&q=%s+extension%%3AR" | |
ext_url <- sprintf(base_ext_url, topic) | |
# if searching with user:cran (the default) add that to the URL |
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
#!/usr/bin/env python | |
# Note, updated version of | |
# https://github.com/ipython/ipython-in-depth/blob/master/tools/nbmerge.py | |
""" | |
usage: | |
python nbmerge.py A.ipynb B.ipynb C.ipynb > merged.ipynb | |
""" | |
import io |
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
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"defaultParams": false, // enable default function parameters | |
"forOf": false, // enable for-of loops | |
"generators": false, // enable generators | |
"objectLiteralComputedProperties": false, // enable computed object literal property names |
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
all: example.ipynb example.html | |
example.md: example.Rmd | |
./knit | |
example.ipynb: example.md | |
notedown example.md | sed '/%%r/d' > example.ipynb | |
example.html: example.Rmd | |
R -e "knitr::knit2html('example.Rmd')" |
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 script was created to convert a directory full | |
# of markdown files into rst equivalents. It uses | |
# pandoc to do the conversion. | |
# | |
# 1. Install pandoc from http://johnmacfarlane.net/pandoc/ | |
# 2. Copy this script into the directory containing the .md files | |
# 3. Ensure that the script has execute permissions | |
# 4. Run the script | |
# | |
# By default this will keep the original .md file |
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
// | |
// Using CoreLocation on Mac OS X with command-line | |
// $ clang CoreLocationTest.m -framework cocoa -framework CoreLocation | |
// $ ./a.out | |
// location service enabled | |
// 2011-12-01 21:03:01.839 a.out[10214:903] latitude,logitude : 35.606647, 140.695538 | |
// 2011-12-01 21:03:01.842 a.out[10214:903] timestamp : 2011-12-01 21:01:36 +0900 | |
// tmiz moo@tmiz.net | |
// | |
#import <cocoa/cocoa.h> |
NewerOlder