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
#!/usr/bin/Rscript --vanilla | |
# from https://github.com/muuankarski/blog | |
# run ./knitpages.R to update all Rmd files that need to be updated. | |
KnitPost <- function(input, outfile) { | |
require(knitr); | |
opts_knit$set(base.dir = "content") | |
opts_knit$set(base.url = "/") |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.duckdns.randyimac</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>curl</string> | |
<string>-w</string> |
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
macro compileinfo(file_name, command) | |
quote | |
open($(esc(file_name)), "w") do io | |
ccall(:jl_dump_compiles, Void, (Ptr{Void},), io.handle) | |
try | |
$command | |
finally | |
close(io) | |
ccall(:jl_dump_compiles, Void, (Ptr{Void},), C_NULL) | |
end |
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
# -*- coding: UTF-8 -*- | |
# From https://github.com/gnunn1/tilix/blob/3f0a3d37f10f6ecfce30deca41636bb13020c2b3/data/nautilus/open-tilix.py | |
# Example modified for Pantheon Terminal | |
# Shortcuts Provider was inspired by captain nemo extension | |
from gettext import gettext, textdomain | |
from subprocess import PIPE, call | |
from urllib import unquote | |
from urlparse import urlparse |
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
# https://gist.github.com/fikr4n/368f2f2070e0f9a15fb4 | |
from math import sqrt | |
def _square(x): | |
return x * x | |
def rgb(x): |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>homebrew.mxcl.syncthing</string> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>HOME</key> | |
<string>/Users/Randy</string> |
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
// [[Rcpp::depends(cubature)]] | |
// [[Rcpp::depends(RcppArmadillo)]] | |
#include <RcppArmadillo.h> | |
#include <exp_cubature.h> | |
using namespace Rcpp; | |
const double log2pi = std::log(2.0 * M_PI); | |
arma::vec mu; |
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 <windows.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
#define BUFSIZE 1024 | |
int main(int ac, char** av) { | |
HANDLE h = GetStdHandle(STD_INPUT_HANDLE); | |
DWORD rd; |
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 LSP.plugin.core.handlers import LanguageHandler | |
from LSP.plugin.core.settings import ClientConfig | |
from LSP.plugin.core.rpc import Notification | |
import os | |
class LspClangRcppPlugin(LanguageHandler): | |
name = "clangd-rcpp" |
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 rapi | |
rapi.start() | |
# let R to set the locale | |
import ctypes | |
from ctypes import wintypes | |
MultiByteToWideChar = ctypes.windll.kernel32.MultiByteToWideChar | |
MultiByteToWideChar.argtypes = [wintypes.UINT, wintypes.DWORD, | |
wintypes.LPCSTR, ctypes.c_int, |