Skip to content

Instantly share code, notes, and snippets.

View danielvartan's full-sized avatar

Daniel Vartanian danielvartan

View GitHub Profile

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
Created February 3, 2024 20:29
Find orphan files in a Zotero database.
# library(checkmate)
# library(magrittr)
# library(purrr)
# library(readr)
# library(stringr)
# Export the Zotero library in a CSV file.
list_linked_files <- function(lib_file = file.choose(),
basename = TRUE) {
checkmate::assert_file_exists(lib_file, access = "r")
@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").

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@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 / CONTRIBUTING.md
Last active September 22, 2021 06:54 — forked from peterdesmet/CONTRIBUTING.md
My CONTRIBUTING.md template for R packages. Released under CC0, so replace our_package, our_org, and maintainer_email and adapt as you see fit. 😌 For more info, see https://help.github.com/articles/setting-guidelines-for-repository-contributors

Contributing to our_package

First of all, thanks for considering contributing to our_package! 👍 It's people like you that make it rewarding for us - the project maintainers - to work on our_package. 😊

our_package is an open source project, maintained by people who care. We are not directly funded to do so.

@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