Skip to content

Instantly share code, notes, and snippets.

View andreineculau's full-sized avatar
:bowtie:

Andrei Neculau andreineculau

:bowtie:
View GitHub Profile
@andreineculau
andreineculau / snowflake.docsetconfig
Created August 25, 2023 20:42
Snowflake docsetconfig for Dash
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>allowFilters</key>
<string>docs.snowflake.com/en/*</string>
<key>basicIndexEnabled</key>
<true/>
<key>cssToInject</key>
<string>footer, #masthead, aside {
@andreineculau
andreineculau / userscript.js
Created August 22, 2023 19:27
Remove a.target usercript
// ==UserScript==
// @name Remove a.target
// @version 0.1
// @match http://*/*
// @match https://*/*
// @grant none
// @run-at document-idle
// ==/UserScript==
(function() {
@andreineculau
andreineculau / devtools-text.js
Last active February 21, 2023 22:40
List all slack channels
$$('div.p-channel_sidebar__channel').map(function(x) {
return [x.dataset.qaChannelSidebarChannelId, x.children[1].textContent];
}).map(x => x.join(',')).join('\n')
@andreineculau
andreineculau / google-apps-script-forward-email-on-header-match.gs
Last active May 11, 2022 15:49
Google Apps Script to forward email on header match
// 1. Add a Gmail "azure" filter to all Azure email for instance
// Matches: from:(azuredevops@microsoft.com)
// Do this: Skip Inbox, Apply label "azure"
// 2. Add a Gmail "azure-forwarded" filter to keep track of those threads that have forwarded messages.
// 3. Add this script to a new project at https://script.google.com
// 4. Replace "X-VSS-Scope: example" with your "X-VSS-Scope" header (open an email, then click "Show original")
// Replace "user@example.com" with your preferred forwarding email target.
@andreineculau
andreineculau / elgato-air-light
Created February 1, 2022 21:33
Control Elgato Air Light from shell
#!/usr/bin/env bash
set -euo pipefail
# USAGE
# elgato-air-light IP ON BRIGHTNESS TEMPERATURE
#
# ON can be 0 or 1
# BRIGTHNESS can be 0-100
# TEMPERATURE can be 0-100
#
@andreineculau
andreineculau / .bashrc
Last active August 21, 2021 09:34
my theme for liquidprompt
. /usr/local/share/liquidprompt
. path/to/lp_andreineculau.theme
lp_theme andreineculau
@andreineculau
andreineculau / travis-ci-com-100-width.css
Created November 11, 2020 11:32
100% width on travis-ci.com
// ==UserScript==
// @name TravisCI 100% width
// @match *://travis-ci.com/*
// ==/UserScript==
.centered .main,
.centered .wrapper-main,
.centered.wrapper .main,
.centered.wrapper .wrapper-main,
.loading-page .main,
@andreineculau
andreineculau / 1.sh
Created July 23, 2020 22:23
How to run a node script that has a package dependency
# Assuming that 2.js is executable
# chmod +x ./2.js
npx -p lodash ./2.js
@andreineculau
andreineculau / Andrei.bttpreset.json
Last active July 14, 2020 23:48
Minimalist BetterTouchTool preset
{
"BTTPresetName" : "Andrei",
"BTTPresetColor" : "77.201250, 220.575000, 158.446375, 255.000000",
"BTTGeneralSettings" : {
"BTTPathSampleSize" : 100,
"BTTHTTPServerPort" : 12345,
"BTTCMOnTop" : true,
"ctrlDisables" : false,
"BTTForceForceClickPressure2F" : 700,
"BSTLeftHalfBlock" : true,
@andreineculau
andreineculau / .git-config
Last active June 29, 2020 11:55
git-filter for codeship jet command (doesn't work because 'jet encrypt' is not deterministic)
# NOTE .git/config not .git-config, but github gist doesn't allow slash
[filter "jet"]
clean = \"$(git rev-parse --git-common-dir)\"/../git-filter-jet-clean %f
smudge = \"$(git rev-parse --git-common-dir)\"/../git-filter-jet-smudge
required = true
[diff "jet"]
textconv = \"$(git rev-parse --git-common-dir)\"/../git-filter-jet-textconv
cachetextconv = true
binary = true