This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(curl) | |
library(yaml) | |
parse_raw_gitpack <- function(buf){ | |
con <- rawConnection(buf) | |
on.exit(close(con)) | |
txt <- readLines(con, warn = FALSE) | |
stopifnot(grepl('^[0-9a-f]{4}#', txt[1])) | |
stopifnot(grepl('service=', txt[1])) | |
if(length(txt) == 2 && txt[2] == '00000000'){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing TOR on mac: brew install tor | |
# Run TOR on custom port: tor --SOCKSPort 9050 | |
# Check the 'origin' field in the response to verify TOR is working. | |
library(httr) | |
GET("https://httpbin.org/get", use_proxy("socks5://localhost:9050")) | |
# Set proxy in curl | |
library(curl) | |
h <- new_handle(proxy = "socks5://localhost:9050") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <v8.h> | |
#include <libplatform/libplatform.h> | |
using v8::HandleScope; | |
using v8::Isolate; | |
using v8::MemorySpan; | |
using v8::WasmModuleObject; | |
using v8::Context; | |
using v8::Local; | |
using v8::Value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import the GPG key | |
wget https://dist.apache.org/repos/dist/dev/arrow/KEYS | |
apt-key add < KEYS | |
# Install libarrow | |
DISTRO=$(lsb_release --codename --short) | |
add-apt-repository "deb [arch=amd64] http://dl.bintray.com/apache/arrow/ubuntu $DISTRO main" | |
apt-get install libarrow-dev libparquet-dev | |
# Install the R package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
set -x | |
cd ~ | |
export R_CRAN_WEB="https://cran.rstudio.com" | |
export CRAN_RSYNC='mirrors.nic.cz::CRAN' | |
# Some prereqs | |
pacman -S --needed --noconfirm wget git make perl curl texinfo texinfo-tex rsync unzip diffutils | |
if [ ! -d "aarch64-w64-mingw32.static.posix" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <curl/curl.h> | |
#include <stdlib.h> | |
#include <string.h> | |
size_t do_nothing(void *contents, size_t sz, size_t nmemb, void *ctx){ | |
return sz * nmemb; | |
} | |
CURL *make_handle(char *url){ | |
CURL *handle = curl_easy_init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Hello World! Site Title</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.0/FileSaver.min.js"></script> | |
<script> | |
import('https://webr.r-wasm.org/latest/webr.mjs').then(function(x){ | |
const webR = new x.WebR(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We use Ubuntu 14.04 to build a native gcc for win32 with multilib support | |
# | |
# Based on: | |
# http://sourceforge.net/p/mingw-w64/wiki2/Native%20Win64%20compiler/ | |
# http://sourceforge.net/p/mingw-w64/code/HEAD/tree/stable/v3.x/mingw-w64-doc/howto-build/mingw-w64-howto-build.txt?format=raw | |
# | |
# Cross compiling notes: | |
# - The minor version of gcc must match that of our cross compiler (4.8 in this case) | |
# - Important parameters: http://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#VERSION=v8.17.0 | |
VERSION=v10.24.1 | |
PATH=/opt/csw/bin:$PATH | |
export CC="gcc" | |
export CXX="g++" | |
curl -OL "https://nodejs.org/download/release/${VERSION}/node-${VERSION}.tar.gz" | |
gunzip node-${VERSION}.tar.gz | |
rm -Rf node-${VERSION} | |
gtar xf node-${VERSION}.tar | |
cd node-${VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM fedora:36 | |
# Simulate the clang location from CRAN | |
RUN ln -s /usr /usr/local/clang15 | |
RUN dnf install -y clang llvm lld | |
COPY script.sh . | |
RUN ./script.sh |
NewerOlder