Skip to content

Instantly share code, notes, and snippets.

View vzemlys's full-sized avatar

Vaidotas Zemlys-Balevičius vzemlys

View GitHub Profile
@vzemlys
vzemlys / save_rstudio_history.R
Created February 9, 2015 09:03
Save Rstudio history database into a nicer format
library(dplyr)
library(magrittr)
library(lubridate)
library(bit64)
library(stringr)
lns <- readLines("~/.rstudio-desktop/history_database") %>% str_split(pattern=":",n=2)
hist_db <- data_frame(epoch=as.integer64(sapply(lns,"[[",1)),history=sapply(lns,"[[",2))
hist_db %<>% mutate(nice_date = as.POSIXct(epoch/1000,origin = "1970-01-01",tz = "EET"))
@vzemlys
vzemlys / markdown.vim
Created June 27, 2012 10:52
VIM Markdown syntax highlighting file for RStudio markdown
" Vim syntax file
" Language: Markdown
" Author: Ben Williams <benw@plasticboy.com>
" Maintainer: Hallison Batista <email@hallisonbatista.com>
" URL: http://plasticboy.com/markdown-vim-mode/
" Version: 1.0.1
" Last Change: Fri Dec 4 08:36:48 AMT 2009
" Remark: Uses HTML syntax file
" Remark: I don't do anything with angle brackets (<>) because that would too easily
" easily conflict with HTML syntax