This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
module Jekyll | |
class Youtube < Liquid::Tag | |
@width = 640 | |
@height = 390 | |
def initialize(name, id, tokens) | |
super | |
@id = id | |
end |
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg | |
$ sudo chown -R `whoami` /usr/local/texlive | |
$ tlmgr update --self | |
$ tlmgr install ucs | |
$ tlmgr install etoolbox | |
# Install pandoc view homebrew |
This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
#!/usr/bin/env fish | |
# similar script in Fish | |
# still under construction, need to quiet `git status` more effectively | |
function update -d 'Update git repo' | |
git stash --quiet | |
git pull | |
git stash apply --quiet | |
end |
#!/bin/sh | |
echo Install all AppStore Apps at first! | |
# no solution to automate AppStore installs | |
read -p "Press any key to continue... " -n1 -s | |
echo '\n' | |
echo Install and Set San Francisco as System Font | |
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)" | |
echo Install Homebrew, Postgres, wget and cask | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
#' Simplified loading and installing of packages | |
#' | |
#' This is a wrapper to \code{\link{require}} and \code{\link{install.packages}}. | |
#' Specifically, this will first try to load the package(s) and if not found | |
#' it will install then load the packages. Additionally, if the | |
#' \code{update=TRUE} parameter is specified it will check the currently | |
#' installed package version with what is available on CRAN (or mirror) and | |
#' install the newer version. | |
#' | |
#' @param pkgs a character vector with the names of the packages to load. |
library(tools) | |
library(assertthat) | |
#' @title Filename extension utilities | |
#' | |
#' @description Replaces, adds or removes (rm) extensions from filenames or test whether | |
#' filename has an extension or is a filename with a particular extension. | |
#' Functions are primarily wrappers | |
#' on the tools package functions \code{file_ext} and \code{file_path_sans_ext}. | |
#' |
As far as I know Rstudio does not count words or characters at the moment, which would be useful particularly when writing Rmarkdown.
This is a quick shortcut using word_count
and character_count
functions from qdap
package. See below for two wrapper functions that simplify their use.
library("qdap")
Just select and copy the text to the clipboard and then run in the console: