I hereby claim:
- I am pokyah on github.
- I am pokyah (https://keybase.io/pokyah) on keybase.
- I have a public key whose fingerprint is DD9D 579D 4F63 83A4 4141 FEE0 CC7D 198F 733D 2F25
To claim this, I am signing this object:
var ui = SpreadsheetApp.getUi(); | |
function onOpen(e){ | |
ui.createMenu("Gmail Manager").addItem("Get Emails by Label", "getGmailEmails").addToUi(); | |
} | |
function getGmailEmails(){ | |
var input = ui.prompt('Label Name', 'Enter the label name that is assigned to your emails:', Browser.Buttons.OK_CANCEL); | |
I hereby claim:
To claim this, I am signing this object:
# R, Java, and RWeka errors | |
**TL;DR version** | |
On macOS | |
1. Make sure up-to-date Java JDK is installed | |
2. Reconfigure R's java paths: R CMD javareconf | |
3. Install rJava from source: install.packages("rJava", type = 'source') | |
4. Install RWeka: install.packages("RWeka") |
#!/bin/bash | |
################################################################################ | |
# Rather than run postgres in its own container, we want to run it on | |
# the (Ubuntu) host and allow: | |
# | |
# + peer connections on the host | |
# + local md5 connections from any docker container | |
# | |
# THIS IS COPY/PASTED FROM COMMAND LINE INPUT AND IS UNTESTED AS A SINGLE SCRIPT | |
################################################################################ |
# Shamlessly stolen from: | |
# https://www.r-bloggers.com/how-to-remove-all-user-installed-packages-in-r/ | |
# create a list of all installed packages | |
ip <- as.data.frame(installed.packages()) | |
head(ip) | |
# if you use MRO, make sure that no packages in this library will be removed | |
ip <- subset(ip, !grepl("MRO", ip$LibPath)) | |
# we don't want to remove base or recommended packages either\ | |
ip <- ip[!(ip[,"Priority"] %in% c("base", "recommended")),] |
library(RCurl) | |
library(rjson) | |
url.base <- function() | |
"http://api.openweathermap.org/data" | |
city.to.id <- function(city, country="AU") { | |
url <- sprintf("%s/2.5/find?q=%s", url.base(), city) | |
res <- fromJSON(getURLContent(url)) | |
if (!is.null(country)) { |
Packrat is a dependency manager for R. When installed and enabled, the R packages required for your project will be saved in a project private library instead of the system library. This means that you can have multiple versions of packages for different projects. It also allow to move a project with all its dependencies from a computer to the other withour the need to reinstall all the packages on the other computer.
# START GUIDE | |
# Make sure you copy the whole lines into Terminal. Each command is on one line. | |
# Open Terminal and become root | |
sudo -s | |
# Update system | |
zypper ref |
2016-10-28: Since I wrote this in 2014, the universe, specifically Kirill Müller (https://github.com/krlmlr), has provided better solutions to this problem. I now recommend that you use one of these two packages:
I use these packages now instead of what I describe below. I'll leave this gist up for historical interest. 😆
//* Enqueue Scripts | |
add_action( 'wp_enqueue_scripts', 'custom_load_scripts' ); | |
function custom_load_scripts() { | |
wp_enqueue_script( 'shrinking-header', get_bloginfo( 'stylesheet_directory' ) . '/js/shrinking-header.js', array( 'jquery' ), '1.0.0', true ); | |
} |