Skip to content

Instantly share code, notes, and snippets.

View danielvartan's full-sized avatar

Daniel Vartanian danielvartan

View GitHub Profile

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@danielvartan
danielvartan / customBadges.md
Created September 8, 2024 21:09 — forked from afig/customBadges.md
Creating a Custom Badge for GitHub Projects

Custom Badges

The Shields service (at shields.io) provides a way to create custom badges for your projects. These are badges are very common and are frequently used to show status information about the project, or demonstrate tools that were used for the development of your project.

Example badge:

Creating a badge

@danielvartan
danielvartan / toTitleCasePT.R
Created June 25, 2024 21:39 — forked from jjesusfilho/toTitleCasePT.R
Converts Portuguese strings to Title Case
#' Convertion to title case with lower case for some classes of words.
#'
#' In written Portuguese, when converting to title case, it is not usual
#' to keep in title case some words, like prepositions, conjunctions,
#' articles and some kinds of pronouns. This functions locates those
#' cases and converts them to lower case.
#'
#' @param string vector of characters to be converted to title case
#' but with connector words (one-word prepositions and conjunctions)
#' and articles (both definite and indefinite) and some pronouns

How to crack ebooks on Linux

If you made the mistake of buying Kindle ebooks and you don't have an iPad or a Kindle to read them on, or if you decided to buy ebooks off a third party reseller and realised they aren't epubs but some bullshit "Adobe DRM" file, this guide is for you.

Adobe DRM

If you have an (unopened) Adobe DRM ebook, forget DeDRM and similar tools,

@danielvartan
danielvartan / find_orphan_files.R
Last active September 2, 2024 06:51
Find orphan files in a Zotero database.
# Install the packages below (in the `library` function) if you don't
# already have them.
# library(checkmate)
# library(magrittr)
# library(purrr)
# library(readr)
# library(stringr)
#' List all files linked to a reference in a Zotero library
@danielvartan
danielvartan / install_RMySQL.md
Created February 5, 2022 10:04 — forked from ijlyttle/install_RMySQL.md
how to install RMySQL

Keep in mind this page (http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL)

Windows 7

Install MySQL Community Server from (http://dev.mysql.com/downloads/mysql/)

Then (from StackOverflow)

  • Go to System->Advanced->Enviroment Variables, press New and Enter Variable name as MYSQL_HOME and Variable values as C:/PROGRA~1/MYSQL/MYSQLS~1.6, and notice that it is / not \. This is a bit different from the StackOverflow answer - the trick is to use the Windows shortname. Open a command window, go to your MySQL directory, and type dir /x to get the correct particular ending. From R, confirm by typing Sys.getenv("MYSQL_HOME").
@danielvartan
danielvartan / license-badges.md
Created June 7, 2021 10:09 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  

Translations: (No guarantee that the translations are up-to-date)

@danielvartan
danielvartan / repo-reset.md
Last active November 14, 2022 23:40 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Before start, disable all branch protections related to the manipulated branchs.

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH
@danielvartan
danielvartan / markdown_guide.md
Created August 19, 2020 05:43 — forked from cuonggt/markdown_guide.md
The Ultimate Guide to Markdown

Markdown Guide

The Ultimate Guide to Markdown

Basic Markdown Formatting

Headings

# This is an <h1> tag

This is an tag