Skip to content

Instantly share code, notes, and snippets.

View ginolhac's full-sized avatar
🚲
graveling

Aurélien Ginolhac ginolhac

🚲
graveling
View GitHub Profile
@shreeshga
shreeshga / gist:1627145
Created January 17, 2012 15:45
md5sum through brew
brew install md5sha1sum
@joemcgill
joemcgill / textbg.css
Created November 5, 2012 22:10
Inline Text Background (CSS only)
/*
* Class for defining text with background on text only and not the whole block.
* May require definition of html element (i.e. p.textbg) in order to make line-height
* and font-size work.
*/
.textbg {
padding:5px 0; /* top and bottom padding */
color:#fff;
font-size: 24px;
@tylerneylon
tylerneylon / learn.lua
Last active May 16, 2024 05:47
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
@hadley
hadley / .gitignore
Last active February 25, 2024 02:10
Benchmark different ways of reading a file
.Rproj.user
.Rhistory
.RData
*.Rproj
*.html
@rmflight
rmflight / post-commit
Last active March 29, 2024 19:43
useful commit hooks for R package dev
#!/path/2/Rscript
# License: CC0 (just be nice and point others to where you got this)
# Author: Robert M Flight <rflight79@gmail.com>, github.com/rmflight
#
# This is a post-commit hook that after a successful commit subsequently increments the package version in DESCRIPTION
# and commits that. Analogous to the pre-commit at https://gist.github.com/rmflight/8863882, but useful if you only have
# good reasons for not doing it on the pre-commit.
#
# To install it, simply copy this into the ".git/hooks/post-commit" file of your git repo, change /path/2/Rscript, and make
@tuksik
tuksik / fix_git_ps1.sh
Last active May 4, 2024 13:56
Fix -bash: __git_ps1: command not found
#http://stackoverflow.com/questions/12870928/mac-bash-git-ps1-command-not-found
curl -o ~/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
echo 'source ~/.git-prompt.sh' >> ~/.bashrc

To -> or not to ->

In the blog post "A Step to the Right in R Assignments", by @hrbrmstr, and in later twitter discussions (e.g. here), it is argued that <- (and %<>% for that matter) is "illogical" and feels awkward.

Although I can see where the temptation comes from, I consider -&gt; to be

@jennybc
jennybc / photo-gallery-README.R
Last active April 3, 2022 19:21
Generate a photo-gallery README for a directory of figs
@hadley
hadley / ds-training.md
Created March 13, 2015 18:49
My advise on what you need to do to become a data scientist...

If you were to give recommendations to your "little brother/sister" on things that they need to do to become a data scientist, what would those things be?

I think the "Data Science Venn Diagram" (http://drewconway.com/zia/2013/3/26/the-data-science-venn-diagram) is a great place to start. You need three things to be a good data scientist:

  • Statistical knowledge
  • Programming/hacking skills
  • Domain expertise

Statistical knowledge

@koncina
koncina / read_prism.R
Created September 6, 2016 14:39
Read a graphpad prism pzfx file in R
# Eric Koncina <mail@koncina.eu>; 01/09/2016
# Imports the tables from a graphpad prism xml file (*.pzfx) into a dataframe
# Works with simple tables (One way ANOVA)
library(xml2)
library(dplyr)
library(purrr)
library(readr)