Skip to content

Instantly share code, notes, and snippets.

View riethmayer's full-sized avatar

Jan Riethmayer riethmayer

View GitHub Profile
@riethmayer
riethmayer / 0_reuse_code.js
Created March 11, 2017 16:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am riethmayer on github.
  • I am riethmayer (https://keybase.io/riethmayer) on keybase.
  • I have a public key whose fingerprint is 5E69 7D83 26D7 359D 4EC3 FBFB 5FDA E3C5 D0EB 5795

To claim this, I am signing this object:

@riethmayer
riethmayer / .emacs
Last active March 21, 2022 13:36 — forked from even4void/.emacs
A basic previewer for R Markdown files edited with Emacs
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.Rmd\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.rmd\\'" . markdown-mode))
(add-hook 'markdown-mode-hook 'turn-on-outline-minor-mode)
(defun rmarkdown-new-chunk (name)
"Insert a new R chunk."
(interactive "sChunk name: ")
(insert "\n```{r " name "}\n")
(save-excursion
SELECT
pid,
datname,
query,
EXTRACT(EPOCH FROM (NOW() - query_start)) AS duration
FROM pg_stat_activity
WHERE state='active'
ORDER BY query_start ASC;
#!/usr/bin/env bash
# Usage: bb devenv setup
# Summary: installs homebrew and all dependencies to run bonsubox projects
set -e
function abort {
echo "$1"
exit 1
}
@riethmayer
riethmayer / belegmeister_java_dotnet_consulant.org
Created February 6, 2014 12:43
belegmeister.de is looking for a hands-on consultants/freelancers (azure cloud, .Net, Java EE)

Belegmeister is looking for a consultant

We’re searching for a hands-on architect/consultant to review our current approach, using the following tech stack:

  • azure
  • .Net
  • Java EE

Please get in touch with Johannes Koch <johannes.koch@belegmeister.de>.

@riethmayer
riethmayer / gist:7156098
Created October 25, 2013 15:02
trecker.com is looking for office space
Hi there,
trecker.com is looking for office space in Berlin.
when: 01.01.2014
what:
- 2 rooms for 3-4 people (approx. 15-20m2), or one big room for 6-8
- access to a conference room
- access to kitchen
where: Mitte/Prenzelberg/Kreuzberg would be ideal
@riethmayer
riethmayer / README.md
Created June 16, 2012 22:58 — forked from croaky/README.md
Typical README for a thoughtbot Rails app that is deployed to Heroku

Rails app

is a Rails 3.1 app running on Ruby 1.9.2 and deployed to Heroku's Cedar stack. It has an RSpec and Cucumber test suite which should be run before commiting to the master branch.

Running tests

Create aliases:

ruby-1.9.2-p290 :043 > SecureRandom.hex(8)
=> "4935b273ef3ff39b"
ruby-1.9.2-p290 :044 > token = _
=> "4935b273ef3ff39b"
ruby-1.9.2-p290 :045 > Cart.create(:token => token)
SQL (0.7ms) INSERT INTO "carts" ("created_at", "token", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 17 Oct 2011 15:06:10 UTC +00:00], ["token", "4935b273ef3ff39b"], ["updated_at", Mon, 17 Oct 2011 15:06:10 UTC +00:00]]
=> #<Cart id: 4, token: "4935b273ef3ff39b", created_at: "2011-10-17 15:06:10", updated_at: "2011-10-17 15:06:10">
ruby-1.9.2-p290 :046 > Cart.where(:token => token)
Cart Load (0.3ms) SELECT "carts".* FROM "carts" WHERE "carts"."token" = '4935b273ef3ff39b'
=> []