Skip to content

Instantly share code, notes, and snippets.

@mbacou
mbacou / opencpu_nproc_error.R
Last active August 8, 2020 22:37
Repex for OpenCPU failed child process error
#' Repex - download 1200+ raster layers from USGS
#' @import data.table stringr
#' @importFrom tools file_path_sans_ext
#' @export
step1 = function(
x = c("2001-01-01", "2004-12-31"),
dir = tempdir()
) {
if(!dir.exists(dir)) dir.create(dir)

Keybase proof

I hereby claim:

  • I am mbacou on github.
  • I am mbacou (https://keybase.io/mbacou) on keybase.
  • I have a public key whose fingerprint is EA64 AE9F 84B8 42EE 2D21 73BE F19A 4463 D73C E3FE

To claim this, I am signing this object:

@mbacou
mbacou / mbacou-theme.el
Created August 17, 2017 00:43
theme for emacs-nox
(deftheme mbacou
"Created 2013-03-25.")
(custom-theme-set-variables
'mbacou
'(ansi-term-color-vector [unspecified "#555555" "#a40000" "#61862F" "#c4a000" "#204a87" "#7653C1" "#4C8FC7" "#ECECEC"]))
(custom-theme-set-faces
'mbacou
'(show-paren-match ((t (:background "#eeeeee"))))
@mbacou
mbacou / emacs-nox.el
Created August 17, 2017 00:40
Standard emacs configuration on Ubuntu 16.04 cloud server
;; Load themes
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default bold shadow italic underline bold bold-italic bold])
@mbacou
mbacou / userChrome.css
Last active March 23, 2024 01:19
Thunderbird chrome (Ubuntu 16.10)
@namespace url ("http: //www.mozilla.org /keymaster/gatekeeper/there.is.only.xul");
#msgHeaderView {
border-bottom: 0 !important;
}
#folderPaneBox {
padding-top: 1em;
border: 0 !important;
}
@mbacou
mbacou / gnome-shell.css
Created March 6, 2017 10:18
Flat-Plat-compact (customized GTK3 and gnome-shell theme)
/* This stylesheet is generated, DO NOT EDIT */
/* Copyright 2009, 2015 Red Hat, Inc.
*
* Portions adapted from Mx's data/style/default.css
* Copyright 2009 Intel Corporation
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 2.1, as published by the Free Software Foundation.
*
@mbacou
mbacou / bashrc.sh
Created March 6, 2017 10:14
Bash init (Ubuntu 16.10)
# ------------------------
# prompt
# ------------------------
alias ls="ls --color"
alias ll="ls -l"
# ------------------------
# alias
# ------------------------
alias h=history
@mbacou
mbacou / emacs.el
Created March 6, 2017 10:12
Emacs init file (Ubuntu 16.10)
;; Load themes
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(blink-cursor-mode nil)
'(c-ignore-auto-fill (quote (cpp)))
@mbacou
mbacou / S3-backup.sh
Last active October 25, 2016 23:45
Server backup to S3
aws configure
# Enter backup user credentials
# See https://console.aws.amazon.com/iam/home?region=us-east-1#users/backup
# Default region name [None]: enter us-east-1
# Default output format [None]: enter json
# Upload
aws s3 cp candace-D-drive-backup.data.bak s3://Candace_Backup/WindowsImageBackup/Candace/
@mbacou
mbacou / spam2005v3r0.R
Last active October 4, 2016 17:50
Convert SPAM from CSV to netCDF format
# Load some R libraries
library(data.table)
library(raster)
# Load CELL5M grid coordinates
grid <- fread("hc_seq_5m.csv")
# Load SPAM from CSV format
spam.a <- fread("spam2005V3r0_SSA_A.csv")