PATH: ~/.config/.shrtcts.yml or ~/.config/.shrtcts.R.
Run shrtcts::add_rstudio_shortcuts() to install shortcuts into RStudio.
PATH: ~/.config/.shrtcts.yml or ~/.config/.shrtcts.R.
Run shrtcts::add_rstudio_shortcuts() to install shortcuts into RStudio.
| #' @title Guess date format | |
| #' @description Guess the date format. | |
| #' @param x a vector (not a factor) | |
| #' @param returnDates logical, whether to return the dates | |
| #' @param tzone time zone | |
| #' @export | |
| guessDateFormat <- function(x, returnDates = FALSE, tzone = "", messages=FALSE) { | |
| tryCatch({ | |
| x1 <- x | |
| # replace blanks with NA and remove |
| # https://developer.github.com/v3/activity/starring/ | |
| mystars <- gh::gh("/users/:username/starred", username = "jimbrig", .limit = Inf) | |
| repo_names <- purrr::map_depth(mystars, 1, purrr::pluck, "full_name") %>% purrr::flatten_chr() | |
| repo_urls <- purrr::map_depth(mystars, 1, purrr::pluck, "url") %>% purrr::flatten_chr() | |
| creation_dates <- purrr::map_depth(mystars, 1, purrr::pluck, "created_at") %>% purrr::flatten_chr() %>% stringr::str_sub(1, 10) %>% lubridate::ymd() | |
| last_updated_dates <- purrr::map_depth(mystars, 1, purrr::pluck, "updated_at") %>% purrr::flatten() %>% stringr::str_sub(1, 10) %>% lubridate::ymd() | |
| stargazers_count <- purrr::map_depth(mystars, 1, purrr::pluck, "stargazers_count") %>% purrr::flatten_int() | |
| languages <- purrr::map_depth(mystars, 1, purrr::pluck, "language") %>% purrr::map(function(x) if (is.null(x)) return("Missing") else x) %>% purrr::flatten_chr() %>% tolower() |
| C:\Program Files (x86)\Microsoft OneDrive\onedrive.exe /reset |
| @echo off | |
| REM Reference: http://www.techrepublic.com/forum/questions/101-215911/dos-command-to-list-all-installed-programs | |
| echo ================= >>software_list.txt | |
| reg export HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall temp1.txt | |
| find "DisplayName" temp1.txt| find /V "ParentDisplayName" > temp2.txt | |
| for /f "tokens=2,3 delims==" %%a in (temp2.txt) do (echo %%a >> software_list.txt) | |
| del temp1.txt | |
| del temp2.txt | |
| REM type software_list.txt | more | |
| echo. |
I was building up a small library of css snippets, and mixing and matching via copy-paste was getting tiresome.
So, I knocked myself up a little solution using https://sass-lang.com/
To use this solution, you need to follow the instructions on the website to install the SASS command line utility.
For my purposes, I created a subfolder in my Obsidian vault called ./.themes where my obsidian.scss file lives.
I also created a subfolder for mixins (./.themes/mixins) containing small snippets like "Andy Matuschak" mode and collapsing sidebars (and my preferred custom colours for my Base2Tone theme)
| # What protocol to use when performing git operations. Supported values: ssh, https | |
| git_protocol: https | |
| # What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment. | |
| editor: | |
| # When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled | |
| prompt: enabled | |
| # A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager. | |
| pager: | |
| # Aliases allow you to create nicknames for gh commands | |
| aliases: |
| $OpenSSHClient = Get-WindowsCapability -Online | ? Name -like ‘OpenSSH.Client*’ | |
| Add-WindowsCapability -Online -Name $OpenSSHClient.Name |