Skip to content

Instantly share code, notes, and snippets.

Alan Dipert alandipert

Block or report user

Report or block alandipert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View jacl-rationale.md

JACL (JavaScript Assisted Common Lisp) is an experimental Lisp system for the web browser platform. It was created to explore new techniques for large-scale SPA (Single Page Application) development in Lisp.

Specifically, the project goals are to:

  1. Implement a useful subset of CL
  2. Interoperate efficiently with JavaScript
  3. Host as much development tooling as possible in the browser so that tools may organically evolve with the applications they’re used to build
  4. Support the delivery of applications competitive in size and speed with respect to those produced by JavaScript tools

Why not JavaScript?

View choicesWithNamesRectangle.R
# Like choicesWithNames(), but returns a data frame of value, label, and
# optgroup columns. This rectangular view could also be thought of as the set
# of paths into the choicesWithNames() tree.
#
# For example, given a choices argument like this:
#
# list(a = 1, B = list(B = 2), c = list(3))
#
# choicesWithNames() would return a tree like this:
#
@alandipert
alandipert / interfaces
Created Mar 12, 2013
raspbian configuration for bridging eth0 and wlan0
View interfaces
# /etc/network/interfaces
# Configured for bridging wifi<->ethernet
# Tested with:
# - RPi Model B Rev. 1
# - 2013-02-09-wheezy-raspbian
# - Edimax 8192-series USB wireless adapter
# - /etc/modprobe.d/8192cu.conf contents:
# - options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
# - firmware: c2d133fb4efe9c9995da7fd7e1c45d74254f5c4b
View ns-cheatsheet.clj
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix.
;;
;; * :use makes functions available without a namespace prefix
;; (i.e., refers functions to the current namespace).
;;
;; * :import refers Java classes to the current namespace.
;;
@alandipert
alandipert / README.md
Last active Aug 7, 2019 — forked from jcheng5/README.md
Installing R-devel on Solaris 10 VM
View README.md

As far as CRAN is concerned, there are two flavors of R on Solaris: one that is built using the Solaris Studio compiler, and one that is built using the GNU/gcc toolchain. The latter is far more up-to-date, but if your package requires it, then your DESCRIPTION file must declare that with the line SystemRequirements: GNU make.

These instructions are for configuring, building, and installing R-devel using the GNU/gcc toolchain (only).

You'll need VMWare Fusion on Mac, or VMWare Workstation (?) on Windows/Linux.

Get Solaris VM

Download the Solaris VM provided by Jeroen Ooms: https://github.com/jeroen/solarisvm

View err.txt
test-bootstrap.r:48: error: Repeated names for selectInput and radioButtons choices
Couldn't normalize path in `addResourcePath`, with arguments: `prefix` = 'font-awesome-5.3.1'; `directoryPath` = ''
1: radioButtons("id", "label", choiceNames = list(icon("calendar"), HTML("<p style=\"color:red;\">Red</p>"), "Normal"), choiceValues = list("icon", "html", "text")) at /home/alan/github/rstudio/shiny/tests/testthat/test-bootstrap.r:48
2: generateOptions(inputId, selected, inline, "radio", args$choiceNames, args$choiceValues) at /home/alan/github/rstudio/shiny/R/input-radiobuttons.R:96
3: mapply(choiceValues, choiceNames, FUN = function(value, name) {
inputTag <- tags$input(type = type, name = inputId, value = value)
if (value %in% selected)
inputTag$attribs$checked <- "checked"
pd <- processDeps(name, session)
if (inline) {
@alandipert
alandipert / app.R
Created Aug 2, 2019
Shiny app with malformed HTML ui
View app.R
library(shiny)
ui <- fluidPage(
titlePanel("Shiny App with Malformed HTML"),
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
@alandipert
alandipert / app.R
Created Aug 2, 2019
Shiny app with malformed HTML ui
View app.R
library(shiny)
ui <- fluidPage(
titlePanel("Shiny App with Malformed HTML"),
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
@alandipert
alandipert / reinvoke.cljs
Last active Jun 22, 2019
It's sweet that IFn is a protocol in ClojureScript
View reinvoke.cljs
(extend-type js/RegExp
cljs.core/IFn
(-invoke ([this s] (re-matches this s))))
(#"foo.*" "foobar") ;=> "foobar"
(#"zoo.*" "foobar") ;=> nil
(filter #".*foo.*" ["foobar" "goobar" "foobaz"]) ;=> ("foobar" "foobaz")
View httpuv_test.R
#!/usr/bin/env Rscript
app <- list(
call = function(req) {
list(
status = 200L,
headers = list('Content-Type' = 'text/html'),
body = '
<html>
<head><title>websocket test</title></head>
You can’t perform that action at this time.