Skip to content

Instantly share code, notes, and snippets.

@gempesaw
gempesaw / gist:a1dee27976802b527d320516853eb73e
Created August 14, 2025 21:19
cloudflare account permission groups
{
"result": [
{
"id": "19637fbb73d242c0a92845d8db0b95b1",
"name": "AI Audit Read",
"description": "Grants access to reading AI Audit",
"scopes": [
"com.cloudflare.api.account.zone"
]
},
import requests
years_months = months = [
(2021, 5),
(2021, 6),
(2021, 7),
(2021, 8),
(2021, 9),
(2021, 10),
(2021, 11),
@gempesaw
gempesaw / SauceConnectConvenience.md
Last active January 2, 2019 08:57
convenience shell scripts for sauce connect
Usage: ./sauce COMMAND
Control your sauce tunnel.

The commands you can use are:

   help         Show this help

   restart      Kill all java processes belonging to the user and
 nohup the sauce tunnel, stdout redirected to
import groovy.json.JsonSlurper
import org.sonatype.nexus.repository.storage.Asset
import org.sonatype.nexus.repository.storage.StorageFacet
def DOCKER_REPOSITORY_NAME = 'docker-hosted'
def dockerRepository = repository.repositoryManager.get(DOCKER_REPOSITORY_NAME)
def dockerBlobStore = blobStore.blobStoreManager.get(dockerRepository.configuration.attributes.storage.blobStoreName)
def storageTx = dockerRepository.facet(StorageFacet.class).txSupplier().get()
try {
-*- mode: compilation; default-directory: "/tmp/" -*-
Comint started at Wed Oct 19 10:19:03
perl -w /tmp/perl.pl
Error while executing command: acceptAlert: An attempt was made to operate on a modal dialog when one was not open.: No tab modal was open when attempting to get the dialog text
Build info: version: '3.0.0-beta4', revision: '3169782', time: '2016-09-29 10:29:23 -0700'
System info: host: 'sc1201.corp.sharecare.com', ip: '10.10.2.131', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, firefoxOptions={args=[], profile=UEsDBBQACAgIAGFSU0kAAAAAAAAAAAAAAAAHAAAAdXNlci5qc51WTW/bMAy971cMOW3AKqTretlOXdcBA4Z1aFDsKMgSbauRJU0fcfPvR/mjSRNHbndKbJMS+fj4yOjBUeugfLconGnxiXhWQvdf6oo0TLXMAQHNCgVi8eFtyZSH91/exJ2nYAFtrHEhudTAVKj7Z4JGG8ln/DWE1rg1qUOwxNbS19uz9Nky788U6CrU6Pjx8vK52xiwAybwR0AAHkB8l86HK4yFK0C34OJhuKbBvB4pr51pgHrupA3URU2DbJLLxXL6osAKTxAOfauvlfEwnc1oL
16:28:17.938 INFO - Executing: [new session: Capabilities [{marionette=true, browserName=firefox, javascriptEnabled=true, version=, platform=ANY}]])
16:28:17.966 INFO - Creating a new session for Capabilities [{marionette=true, browserName=firefox, javascriptEnabled=true, version=, platform=ANY}]
16:28:18.168 INFO - Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
1475526498667 Marionette INFO Listening on port 64184
1475526499636 Marionette INFO startBrowser bf03fcb9-11aa-a240-b517-b44d3e0ed157
16:28:19.820 INFO - Detected dialect: W3C
16:28:19.835 INFO - Done: [new session: Capabilities [{marionette=true, firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@33b5c24a, browserName=firefox, javascriptEnabled=true, version=, platform=ANY}]]
16:28:19.873 INFO - Executing: [get window size])
16:28:19.880 WARN - Exception thrown
java.lang.NullPointerException
@gempesaw
gempesaw / right command to f17.xml
Last active December 31, 2015 06:09
os x right option to f17
<?xml version="1.0"?>
<root>
<item>
<name>Change right option key to F17</name>
<identifier>private.right_option_to_f17</identifier>
<autogen>__KeyToKey__ KeyCode::RawValue::0x6e, KeyCode::F17</autogen>
</item>
<item>
<name>Shifts to Parentheses</name>
<appendix>Shifts, when pressed alone, type parentheses. When used with other keys they're normal shifts.</appendix>
@gempesaw
gempesaw / subtitle-shifter.el
Last active December 27, 2015 01:28
Convenience functions for shifting between milliseconds and 00:00:00,000 format along with an interactive function to rewrite each of the timers in a .srt file. Invoking `convert-next-time` will run through the whole file and try to avoid getting stopped by `max-specpdl-size`. That's probably bad, for bigger .srt files...
(defvar time-multipliers `(,(* 60 60 1000) ,(* 60 1000) 1000 1)
"Multipliers for going to and from milliseconds and
00:00:00,000 format")
(defvar subtitle-offset "00:00:04,764"
"Amount in 00:00:00,000 format of offset to shift the values
by ")
(ert-deftest subtitle-shift-tests ()
(let ((max-lisp-eval-depth 1500)
@gempesaw
gempesaw / webdriverAddCookie.pl
Created February 26, 2013 16:41
webdriver set a cookie
#! /usr/bin/perl
use strict;
use warnings;
use Selenium::Remote::Driver;
my $driver = new Selenium::Remote::Driver();
$driver->get("http://www.google.com");
@gempesaw
gempesaw / patch-two-files-alongside.el
Last active December 13, 2015 22:49
patch-two-files-alongside
;; https://plus.google.com/u/0/105641731374531810537/posts/YDz3n6BWmea
(defun my-stitch-two-files-alongside (left-file right-file)
"Patch two files together side by side"
(interactive "fRequest file: \nfResponse file: ")
(pop-to-buffer (generate-new-buffer "merged-req-rsp-files"))
(let ((left-strings (file-string-list left-file))
(right-strings (file-string-list right-file)))
(while left-strings
(insert (car left-strings) " -> " (car right-strings))