Skip to content

Instantly share code, notes, and snippets.

View theclue's full-sized avatar

Gabriele Baldassarre theclue

View GitHub Profile
@theclue
theclue / README.md
Created September 13, 2022 07:37 — forked from knoopx/README.md
Creality Ender 3 Stock Factory Vref

Creality3D v1.1.2 stock vref values

A4988 Drivers
Vref set to ~90% of stepper rated current
Rs = 0.1ohm

X = 0,58v (0,725A)
Y = 0,58v (0,725A)
Z = 0,58v (0,725A)
@theclue
theclue / multi_channel_attribution.sql
Created May 27, 2021 16:18 — forked from markrittman/multi_channel_attribution.sql
Multi-Channel Attribution Standard SQL query for Google BigQuery sourcing session data from Segment and attributed value from operational system
WITH session_attributiON AS
(SELECT *,
CASE WHEN session_id = LAST_VALUE(session_id)
OVER (partitiON by user_id order by session_start_tstamp ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) THEN 1
ELSE 0
END AS LAST_click_attrib_pct,
CASE WHEN session_id = FIRST_VALUE(session_id)
OVER (partitiON by user_id order by session_start_tstamp ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) THEN 1
ELSE 0
END AS first_click_attrib_pct,
@theclue
theclue / pandoc.css
Created April 18, 2020 22:07 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@theclue
theclue / install_generic.sh
Created February 20, 2020 12:02 — forked from victorono/install_generic.sh
Install all Google Web Fonts onto your local machine
#!/bin/bash
# OS detect
osdetect=$(uname)
file_path="unknown"
if [[ "$osdetect" == 'Linux' ]]; then
file_path="sudo mv fonts/* /usr/local/share/fonts/"
elif [[ "$osdetect" == 'Darwin' ]]; then
file_path="mv fonts/* /Library/Fonts/"
elif [[ "$osdetect" == 'Arch Linux' ]]; then
@theclue
theclue / install-google-fonts.sh
Created February 20, 2020 12:00 — forked from jbsmith86/install-google-fonts.sh
A bash script to install all Google Fonts, system wide, on debian based systems (ex. Ubuntu)
#!/bin/sh
# Written by: Keefer Rourke <https://krourke.org>
# Based on AUR package <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-google-fonts-git>
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git
sudo apt-get install fonts-cantarell git
srcdir="/tmp/google-fonts"
pkgdir="/usr/share/fonts/truetype/google-fonts"
giturl="git://github.com/google/fonts.git"
@theclue
theclue / rstudio-kubernetes.rstudio-ingress.yaml
Last active September 20, 2018 13:17
Kubernetes in Google Cloud Platform
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: rstudio-ingress-nginx
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/add-base-url: "true"
nginx.ingress.kubernetes.io/proxy-redirect-from: "$scheme://$host/"
@theclue
theclue / subscribe-form.html
Created June 28, 2018 20:53 — forked from sharu725/subscribe-form.html
Jekyll Subscribe Form using Mailchimp
<!--
Before implementing this jekyll snippet make sure
1. you have signed up with Mailchimp.
2. you have created a list in Mailchimp.
3. you have defined the list in _config.yml,
for ex: "mailchimp-list: //redgadgets.us10.list-manage.com/subscribe/post?u=210acce5db69d3d4a04b0e25d&amp;id=08c6708f40"
-->
<form action="{{site.mailchimp-list}}" method="post" name="mc-embedded-subscribe-form" class="wj-contact-form validate" target="_blank" novalidate>
<div class="mc-field-group">
@theclue
theclue / mac.setup.sh
Last active September 16, 2025 13:56
My Sequoia Macintosh DevBox
###
# XCODE
#
sudo xcode-select --install
###
# HOMEBREW
#
if test ! $(which brew); then
echo "Installing homebrew..."
@theclue
theclue / ggplot-multiplot.R
Created May 11, 2017 21:07
R Function to arrange multiple ggplots in a grid layout
# Multiple plot function
#
# ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects)
# - cols: Number of columns in layout
# - layout: A matrix specifying the layout. If present, 'cols' is ignored.
#
# If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE),
# then plot 1 will go in the upper left, 2 will go in the upper right, and
# 3 will go all the way across the bottom.
#