Skip to content

Instantly share code, notes, and snippets.

View LateNightIceCream's full-sized avatar
🥬
!

LateNightIceCream

🥬
!
View GitHub Profile
@LateNightIceCream
LateNightIceCream / logScale.R
Last active December 9, 2021 10:39
logarithmic breaks in ggplot2 with pretty exponential labels (MWE)
library(ggplot2)
library(scales)
data <- data.frame(x = 1:100, y = 1:100)
xbreaks <- 10^(0:10)
minor_breaks <- rep(1:9, 21)*(10^rep(0:10, each=9))
plot <- ggplot(data = data, aes(x = x, y = y)) +
scale_x_continuous( trans="log10",breaks = xbreaks, minor_breaks=minor_breaks, labels = trans_format("log10", math_format(10^.x))) +
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
void
child_print (char* str) {
printf("Child: %s\n", str);
}
// open browser console while watching a stream (F12-->console on firefox), paste and enter
//let buttonDescriptor = ".tw-button";
let buttonDescriptor = ".ScCoreButtonSuccess-sc-1qn4ixc-5";
function log (message) {
console.log("Twitch Auto Treasure Trigger: " + "[" + timeStamp() + "]\n" + message );
}
function timeStamp () {