Skip to content

Instantly share code, notes, and snippets.

Baptiste Maingret bmaingret

View GitHub Profile
@bmaingret
bmaingret / README.md
Created Apr 29, 2020 — forked from JamesMessinger/README.md
VSCode GitHub Markdown Theme
View README.md

GitHub Markdown Theme for Visual Studio Code

This CSS stylesheet allows you to preview markdown files in VSCode using GitHub's mardown theme. This CSS was taken directly from the official GitHub Markdown repo. I replaced their top-level .markdown-body class with the body tag so it would work in VSCode, and added styling for the html tag to match GitHub's fixed-width container.

Instructions

  1. Copy the CSS file to your computer
    Copy the github-markdown.css file below to your computer. You can put it anywhere you want, but I chose to put it in the same folder as my VSCode settings file.

  2. Edit your VSCode settings
    If you want to use this theme for all of your projects, then edit your User Settings file. If you just want to use this them

View R.gitignore
# History files
.Rhistory
.Rapp.history
# Session Data files
.RData
# User-specific files
.Ruserdata
@bmaingret
bmaingret / clean_old_files.ps1
Last active Feb 1, 2019
Copy/Move all files that have been modified a few days ago from a source to a daily backup directory
View clean_old_files.ps1
<#
#
.Synopsis
.DESCRIPTION
Copy all files from $sourceDirectory to a directory named $targetDirectory\'yyyy-mm-dd' based on current day that have been modified at least $minimumAgeInDays days ago
Typical usage is the purge of a directory: copy files older than $minimumAgeInDays days to another directory
.NOTES
Created By: Baptiste Maingret
@bmaingret
bmaingret / gist:5402111
Last active Dec 16, 2015
Bash script - saving output to input file for commands like iconv
View gist:5402111
for file in *.php
do
iconv -f cp1251 -t utf8 -o "$file.new" "$file" &&
mv -f "$file.new" "$file"
done
You can’t perform that action at this time.