Skip to content

Instantly share code, notes, and snippets.

View daroczig's full-sized avatar

Gergely Daróczi daroczig

View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<title></title>
</head>
<body>
<p>List:</p>
<ul>
@daroczig
daroczig / buildpkg.R
Created April 17, 2012 14:41 — forked from aL3xa/buildpkg.R
Build, Check, Install and (Re)Load R Package
b <- function(path = "package/", ...){
require(devtools)
require(roxygen2)
pkg <- as.package(path) # package pointer
## update documentation
message("Updating documentation...")
roxygenise(path, ...)
@daroczig
daroczig / .emacs
Created April 20, 2012 14:39
Building and (re)loading packages with a keypress in Emacs
(defun ess-build-and-load-package ()
"Builds R pkg in current project and (re)loads it in R session."
(interactive)
(setq curbuf (current-buffer))
(setq w1 (selected-window))
(setq w1name (buffer-name))
(setq tmpbuf (get-buffer-create "*pkg build*"))
(setq w2 (split-window-horizontally))
(shell-command (format "~/.emacs.d/build-R-pkg.sh %s" eproject-root) tmpbuf )
(ess-command (format "pkg.path <- \"%s\";pkg.name <- readLines(file.path(pkg.path, 'DESCRIPTION'));pkg.name <- strsplit(pkg.name[grepl('Package: ', pkg.name)], ' ')[[1]][2];pkg.ns <- paste0('package:', pkg.name);if (!is.na(match(pkg.ns, search()))){detach(pkg.ns, character.only = TRUE)};library(pkg.name, character.only = TRUE, unload = TRUE)\n" eproject-root))
@daroczig
daroczig / PKGBUILD
Created June 27, 2012 08:01
rescuetime 2.6.0.144
basename=rescuetime
pkgname="$basename-beta"
pkgver=2.6.0
pkgrel=144
pkgdesc="RescueTime time tracker software (binary beta) + firefox extension"
url="https://www.rescuetime.com"
arch=('i686' 'x86_64')
license=('GPL2')
depends=('qt' 'xprintidle')
optdepends=('firefox: site time tracking')
## load "pander" package
## http://rapporter.github.com/pander/
library(pander)
## "brew" the below file to Pandoc's markdown
Pandoc.brew('example.brew')
## or convert to HTML at one go
## NOTE: `pandoc` is needed for the conversion
Pandoc.brew('example.brew', output = tempfile(), convert = 'html')
@daroczig
daroczig / UK_dialect_maps.tpl
Last active December 19, 2015 13:49
Analysing the results of The Cambridge Online Survey of World Englishes in the United Kingdom. See related blogpost @ http://blog.rapporter.net/2013/07/uk-dialect-maps.html
<!--head
meta:
title: UK language usage
description: Analysing the results of The Cambridge Online Survey of World Englishes
in the United Kingdom
author: ' (@daroczig)'
packages:
- class
- descr
- dismo
@daroczig
daroczig / PKGBUILD
Last active December 21, 2015 05:59
snakefire-git updated PKGBUILD: https://aur.archlinux.org/packages/snakefire-git/
# Maintainer: Igor Yanchenko <yanchenko.igor@gmail.com>
# Updated: Gergely Daróczig <gergely@snowl.net>
pkgname=snakefire-git
pkgver=20130818
pkgrel=1
pkgdesc='A Campfire desktop client'
arch=('i686' 'x86_64' 'ppc')
url='http://snakefire.org'
license=('MIT')
depends=('python2' 'python2-distribute' 'python-pyfire' 'python2-pyqt' 'python2-keyring' 'python2-notify' 'python2-pyenchant')
@daroczig
daroczig / demo.Rmd
Created September 8, 2013 18:10
knitting with pander
```{r include=FALSE}
library(pander); library(xtable)
```
# `pander` demo
```{r, results="asis"}
pander(CO2[1:8, ], style = 'rmarkdown')
```
@daroczig
daroczig / PKGBUILD
Created September 18, 2013 13:39
PKGBUILD for kdeplasma-applets-applicationname
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
pkgname=kdeplasma-applets-applicationname
pkgver=1.7
pkgrel=1
pkgdesc="A QML plasmoid to display the application name of the focused window"
arch=('any')
url="https://github.com/ndr/applicationname-plasmoid"
license=('GPL')
depends=('kdebase-workspace')
## compile a list of available packages on CRAN
aps <- as.data.frame(available.packages())
## get the list of Depends and clean up a bit
deps <- gdata::trim(unlist(strsplit(as.character(aps$Depends), ',')))
deps <- gsub('[ \\(].*|\\n', '', deps)
## freq table
depst <- table(deps)