Skip to content

Instantly share code, notes, and snippets.

View motin's full-sized avatar

Motin motin

View GitHub Profile
df1 = pd.DataFrame([
{"url": "a", "Foo": '=C$2:C2', "bar": 'Cat'},
{"url": "b", "Foo": '=C$2:C3', "bar": 'Mouse'},
{"url": "c", "Foo": '=C$2:C2', "bar": 'Dog'},
{"url": "d", "Foo": '=C$2:C5', "bar": 'Eagle'},
{"url": "e", "Foo": 'C$2:C6', "bar": 'Albatross'},
{"url": "f", "Foo": '', "bar": 'Albatross'},
def df_add_col(df):
View console-export-2020-1-2_10-1-30.txt
Could not map contract ID ';1' to CID {1201d357-8417-4926-a694-e6408fbedcf8} because no implementation of the CID is registered.
Experiment add-on background.js background.js:22:9
Object { config: {…} }
Checking study eligibility background.js:70:11
Eligible background.js:53:15
Writing hard-coded score threshold 5000 background.js:86:11
Object { permanentPrivateBrowsing: false }
Fetching "cfr-ml-model" bucket contents directly from the remote settings server endpoint background.js:103:17
motin /
Last active May 3, 2019 12:47
Running a fork of OpenWPM on your Mac

Running a fork of OpenWPM on your Mac Natively

OpenWPM is a brilliant piece of software for running large-scale website crawls using a remotely controlled browser (Firefox) instead of utilizing a classic web scraping tool. It can easily be extended to collect any sort of data that a browser can collect and comes pre-configured to collect information regarding fingerprinting-related Javascript executions and first/third-party website traffic. The resulting data ends up in a SQLite database (for smaller data collections) or stored in JSON format in the cloud (for large scale data collections).

This document has moved to

motin / ttbwsd-simple-example-mobile.txt
Last active November 13, 2018 16:02
View ttbwsd-simple-example-mobile.txt
S 1423
P 1504 1514
P 5
P 1723
motin / ttbwsd-simple-example-desktop.txt
Created November 13, 2018 15:23
View ttbwsd-simple-example-desktop.txt
start 2018-11-13 14:23
pause 15:04->15:14
pause 5min
pause 17:23->
motin / ttbwsd-advanced-example-desktop.txt
Last active November 13, 2018 15:25
View ttbwsd-advanced-example-desktop.txt
start 2018-11-13 (+0200) 14:23
2018-11-13 (+0200) 14:33, this is an optional comment/note about something that was worth noting down
2018-11-13 (+0200) 15:04, time to take a break
pause->2018-11-13 (+0200) 15:14
2018-11-13 (+0200) 15:16, a couple of minutes ago, when I got back from the break, I inserted a new timestamp (above) to signal that the break is over.
pause 5min # look, I had a short break somewhere here, not important exactly when, but it was not work-related, so I noted it down like this
motin / commit-using-commitizen-in-new-iterm-window.scpt
Last active January 10, 2023 18:57
Add as SourceTree custom action: Open in Seperate Window (checked), Script to run `/path/to/` (this path MUST NOT contain spaces due to long-standing SourceTree bug, Parameters: `$REPO`
View commit-using-commitizen-in-new-iterm-window.scpt
on run argv
set repoPath to (item 1 of argv)
tell application "iTerm"
set newWindow to (create window with default profile)
tell current session of newWindow
write text "cd " & quoted form of repoPath & " && npx git-cz"
end tell
end tell
end run
motin / server.R
Created September 3, 2018 00:36 — forked from ncarchedi/server.R
Dynamically append arbitrary number of inputs (Shiny)
View server.R
shinyServer(function(input, output) {
output$allInputs <- renderUI({
# Get value of button, which represents number of times pressed (i.e. number of inputs added)
inputsToShow <- input$appendInput
# Return if button not pressed yet
if(is.null(inputsToShow) || inputsToShow < 1) return()
# Initialize list of inputs
View background.js
/* global Study */
// All background/content scripts wraps their logic to wait for the study onAllowed event
// (listener needs to be setup before running Study.onWebExtensionLoad()) => {
// Will send the onAllow event if the study is allowed to run
motin / Auth0ManagementApiClient.php
Created December 19, 2017 14:51
Example of client class to perform auth0 management api requests in php. AppJson.php is available here:
View Auth0ManagementApiClient.php
Example usage:
$this->auth0ManagementApiClient = new Auth0ManagementApiClient();
$accessToken = $this->auth0ManagementApiClient->ensureAccessToken();
if (!$accessToken) {
throw new Exception("Auth0 management access token empty");