Skip to content

Instantly share code, notes, and snippets.

View adalinesimonian's full-sized avatar
😈
Up to no good

Adaline Valentina Simonian adalinesimonian

😈
Up to no good
View GitHub Profile
@adalinesimonian
adalinesimonian / lingust-deepl-translator.js
Created January 7, 2024 06:07
Linguist custom translator for DeepL with Nynorsk support
const deepLApiKey = '' // REQUIRED, Specify your DeepL API key here
const apiSubdomain = deepLApiKey.endsWith(':fx') ? 'api-free' : 'api'
class DeepLTranslator {
async translate(text, from, to) {
const deeplFrom = from === 'nn' ? 'nb' : from
let deeplText = text
// If from language is Nynorsk, convert to Bokmål using Apertium
if (from === 'nn') {
@adalinesimonian
adalinesimonian / block-the-blue.md
Last active December 27, 2024 22:02
Block all verified Twitter accounts on screen
@adalinesimonian
adalinesimonian / block-the-blue.js
Last active April 22, 2023 01:22
Block all verified Twitter accounts with tweets on screen
// MOVED TO https://gist.github.com/adalinesimonian/b52a753c9fd6c176598745df01ba12dc
@adalinesimonian
adalinesimonian / auto-block-twitter-results.js
Last active April 21, 2023 22:34
Block all users in Twitter search results
// 1. Search for the Twitter users you want to block.
// 2. Execute this script in your browser console.
// Only the accounts visible on the current page of results will be blocked.
// Scroll further down as the script runs to block more users.
// One-liner
(async () => { let element; while (element = document.querySelector('[role="article"] [aria-label="More"]')) { element.click(); await new Promise((resolve) => { const observer = new MutationObserver(() => { if (document.querySelector('[data-testid="block"]')) { observer.disconnect(); resolve(); } }); observer.observe(document.body, { childList: true, subtree: true }); }); document.querySelector('[data-testid="block"]').click(); await new Promise((resolve) => setTimeout(resolve, 500)); document.querySelector('[data-testid="confirmationSheetConfirm"]').click(); await new Promise((resolve) => setTimeout(resolve, 500)); } })();
@adalinesimonian
adalinesimonian / instrument_track.lua
Created April 14, 2021 18:06
ReaScript to create instrument tracks for multi-channel VST tracks
-- instrument_track.lua fork v0.1 by Adaline Simonian
-- (@adaline on reaper forums, @adalinesimonian on github)
-- forked from instrument_track.lua v0.2 by Christian Fillion (cfillion)
--
-- use this script while selecting a multi-channel vst track.
--
-- it creates instrument tracks that both send midi and receive audio
-- so make sure that you have feedback in routing enabled (found in
-- project settings -> advanced).
--
@adalinesimonian
adalinesimonian / vscode.desktop
Last active November 4, 2015 06:52 — forked from benjamindean/Code.desktop
Linux desktop entry for Visual Studio Code. Belongs in `/usr/local/share/applications/`. For this to work, VS Code should live in `/usr/local/share/vscode/`
[Desktop Entry]
Name=Visual Studio Code
Exec=/usr/local/share/vscode/Code %U
Terminal=false
Icon=/usr/local/share/vscode/resources/app/vso.png
Type=Application
StartupNotify=true
Categories=TextEditor;Development;Utility;
MimeType=text/plain;
@adalinesimonian
adalinesimonian / node-find-dep-requires.sh
Last active September 18, 2015 01:03
Find all "require"s for dependencies and find out if all "require"s have matching dependencies
#!/bin/sh
# Requires ag - The Silver Searcher (https://github.com/ggreer/the_silver_searcher)
# (no options) - checks if dependencies are in use
# -d - checks if all requires have a matching dependency entry
# One-liner that checks for in-use dependencies
# grep -Pzo "(?s)(?<=\"dependencies\": {)[^}]+" package.json | grep -ohP "(?<=\")[^\"]+(?=\":)" | xargs -L1 --replace sh -c "if ! ag \"require[\\( ]'{}'\" > /dev/null 2> /dev/null; then printf '\\033[1;31mREQUIRE NOT FOUND:\\t%s\033[m\\n' {}; else printf 'Require found:\\t\\t%s\\n' {}; fi"
@adalinesimonian
adalinesimonian / gulpfile-babel.js
Created September 15, 2015 18:50
Gulpfile for Babel using gulp-watch built for Node.js 4.0
var gulp = require('gulp')
var watch = require('gulp-watch')
var babel = require('gulp-babel')
var plumber = require('gulp-plumber')
var libDir = 'lib/'
var srcDir = 'src/**/*.es6'
function runBabel () {
return gulp.src(srcDir)
@adalinesimonian
adalinesimonian / buffer-ucs2-segfault-backtrace.log
Created August 20, 2015 07:16
Segfault when writing to Buffer using UCS2 encoding
vartan@Vartan-Desktop  ~/Code/Practice/buffer-segfault  gdb --args node main.js
GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@adalinesimonian
adalinesimonian / _materialcolors.scss
Created April 26, 2015 05:55
Material Design Sass Map
$material_colors: (
red_50: #ffebee,
red_100: #ffcdd2,
red_200: #ef9a9a,
red_300: #e57373,
red_400: #ef5350,
red_500: #f44336,
red_600: #e53935,
red_700: #d32f2f,
red_800: #c62828,