Skip to content

Instantly share code, notes, and snippets.

@vnijs
vnijs / server.R
Last active August 29, 2015 14:08 — forked from ptoche/server.R
# server.R
library("shiny")
shinyServer(
function(input, output, session) {
# Debug Area
output$Console <- renderUI({
@vnijs
vnijs / server.R
Last active August 29, 2015 14:08 — forked from Athospd/server.R
library(shiny)
library(magrittr)
shinyServer(function(input, output, session) {
#__________________________________________________________________________________
# The main named list that will be used in many other tasks.
listN <- reactiveValues()
#__________________________________________________________________________________
library(DBI)
library(RSQLite)
library(readr)
library(dplyr)
#=========================================================================
# Read a CSV file in chunks and stuff into a database.
#
# Note: This is proof-of-concept code only.
# It should work OK, but there are no guarantees.
library(dplyr); library(httr); library(rvest)
addr <- "Big Ben"
GET("http://maps.google.com/maps/api/geocode/xml",
query = list(address = addr)) %>%
content() %>%
html_nodes(xpath = "//location//lat | //location//lng") %>%
html_text() %>%
setNames(c("lng", "lat"))
@vnijs
vnijs / server.R
Last active August 29, 2015 14:23 — forked from jcheng5/server.R
shinyServer(function(input, output, session) {
# On startup, read the URL parameter
queryParams <- parseQueryString(isolate(session$clientData$url_search))
if ('tab' %in% names(queryParams))
updateTabsetPanel(session, 'tabset', selected = paste0('tab', queryParams[['tab']]))
})
@vnijs
vnijs / .tmux.conf
Created December 26, 2018 18:41 — forked from CSaratakij/.tmux.conf
Tmux's Config that's very close to i3wm (Setting with an idea of using tmux without x-server)
# Config that is very close to a i3 window manager's keybinding.
set -s escape-time 0
setw -g aggressive-resize on
# First remove *all* keybindings
unbind-key -a
# List keys
bind-key ? list-keys