Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / utmstrip.user.js
Last active July 27, 2024 08:10
userscript: Drop the UTM params from a URL when the page loads
// ==UserScript==
// @name UTM param stripper
// @author Paul Irish
// @namespace http://github.com/paulirish
// @version 1.2
// @description Drop the UTM params from a URL when the page loads.
// @extra Cuz you know they're all ugly n shit.
// @include http*://*
// ==/UserScript==
@jcheng5
jcheng5 / server.R
Last active June 17, 2021 18:37
Shiny example: Diamonds Explorer
library(shiny)
library(ggplot2)
function(input, output) {
dataset <- reactive({
diamonds[sample(nrow(diamonds), input$sampleSize),]
})
output$plot <- renderPlot({
@thiemehennis
thiemehennis / edX student module analytics to R
Last active December 31, 2015 12:49
This R code cleans up raw sql edX dataset into a new dataset with columns "Student", "Question", "Answer". The previous version contained a Credits: Written by @cbdvs for beautiful karma!
# Credits for @cbdvs (Christopher Davis) - check out his amazing work here: http://enipedia.tudelft.nl or email him at: c.b.davis@tudelft.nl
#never ever convert strings to factors
options(stringsAsFactors = FALSE)
###### TODO set this, the data will be written out there
setwd("/home/username/Desktop/R data/")
file.remove("allData.csv") ## removes the old datafile if there is one (so the data is not appended to the file, but a new file is created)
@davidsword
davidsword / convert-alfred-snippets-to-espanso.php
Last active July 8, 2024 16:57
Convert Alfred Snippets to Espanso matches
<?php
/**
* Convert Alfred Snippets to Espanso matches
*
* @see https://www.alfredapp.com/help/features/snippets/
* @see https://espanso.org/
*/
define('SNIPPETS_DIR', '/path/to/export/of/Alfred/snippets/');