This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function startFunction() { | |
// If email has 1-Ingrid label and sublabel label then delete 1-Ingrid: | |
mainFunction("Ingrid"); | |
mainFunction("Claire"); | |
} | |
function mainFunction(name) { | |
var amountOfLabelsRemoved = 0; | |
var subLabelsWithUsername = getSubLabels(name); | |
for (var x = 0; x < subLabelsWithUsername.length; x++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"DismissedWarnings" : { | |
"DismissableWarning_RunTutorialAgain" : true | |
}, | |
"GpuSpeed" : { | |
"gpuSpeed0" : 17, | |
"gpuSpeed1" : 17, | |
"gpuSpeed2" : 17, | |
"gpuSpeedCount" : 3, | |
"gpuSpeedDriver" : "25.21.14.1967", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
get_go() { | |
# [get_golang.sh](https://gist.github.com/n8henrie/1043443463a4a511acf98aaa4f8f0f69) | |
# Download latest Golang release for AMD64 | |
# https://dl.google.com/go/go1.10.linux-amd64.tar.gz | |
set -euf -o pipefail | |
# Install pre-reqs | |
sudo apt-get install python3 git -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These scripts set up Crostini on my Acer Chromebook Spin 13 | |
wget https://gist.githubusercontent.com/thibaultmol/aaf275a0bb36ba4aa8481e845aeb3135/raw/setup-crostini.sh \ | |
&& chmod +x ./setup-crostini.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var t="",a=document.querySelectorAll("p,h1,h2,h3,h4,h5,h6,td,th,li,dt,dd");for(i=0;i<a.length;i++){if(a[i].nodeType==1){t+=a[i].textContent+"\n"}}var l=document.querySelectorAll("a");for(i=0;i<l.length;i++){if(!l[i].href.endsWith(".jpg") && !l[i].href.endsWith(".jpeg") && !l[i].href.endsWith(".png") && !l[i].href.endsWith(".gif")){t+=l[i].textContent+" ("+l[i].href+")\n"}}t=t.split("\n");for(i=0;i<t.length;i++){if(t[i].includes("<img")){var c=1;while(!t[i+c].includes(">")){c++}t.splice(i,c+1);i--}}t=t.join("\n");t=t.replace(/^\s*[\r\n]/gm,"");t="addr:housenumber=\naddr:street=\ncontact:facebook=\ncontact:instagram=\nemail=\nphone=\nopening_hours=\nref:vatin=\n\nExtract from the text below the openstreetmap tags mentioned above. Make sure everything is formatted according to Openstreetmap's conventions.\n\"ref:vatin\" should be formatted without spaces; in one continuous number (no dots/points).\nPhone should be formatted with country code +32\nDon't add data when you're not sure about i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from shapely.geometry import Polygon | |
# Generate geojson grid https://cityofaustin.github.io/geojson-grid/ and save it as grid.json | |
# Load the input file | |
with open("grid.json", "r") as f: | |
data = json.load(f) | |
# Iterate through the features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Download-FFmpeg { | |
# Download FFmpeg from the official website | |
$url = "https://ffmpeg.org/releases/ffmpeg-latest-win64-static.zip" | |
$output = "$env:TEMP\ffmpeg.zip" | |
Invoke-WebRequest -Uri $url -OutFile $output | |
# Extract the files | |
Expand-Archive -Path $output -DestinationPath $env:TEMP | |
# Add FFmpeg to the system PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
# This is a reply to https://www.reddit.com/r/ObsidianMD/comments/11rw50n/comment/jcagzq4/?utm_source=reddit&utm_medium=web2x&context=3 | |
echo "Updating the package list and installing Docker..." | |
sudo apt-get update | |
sudo apt-get install -y docker.io | |
echo "Installing Nginx Proxy Manager (NPM) in a Docker container..." | |
sudo docker run -d --name npm -p 81:81 -p 443:443 -v npmdata:/data --restart always jlesage/nginx-proxy-manager | |
echo "Waiting for NPM to start up before proceeding..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){let prefix='https://kbin.social/m/';let url=window.location.href;let parts=url.split('/');let finalPart=parts[parts.length-1];let host=parts[2];let newURL=prefix+finalPart+'@'+host;window.open(newURL,'_blank');})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ensure the required tools are installed | |
command -v pdfimages >/dev/null 2>&1 || { echo >&2 "pdfimages (poppler-utils) is required but it's not installed. Exiting."; exit 1; } | |
command -v convert >/dev/null 2>&1 || { echo >&2 "convert (ImageMagick) is required but it's not installed. Exiting."; exit 1; } | |
command -v tesseract >/dev/null 2>&1 || { echo >&2 "tesseract is required but it's not installed. Exiting."; exit 1; } | |
command -v pdftk >/dev/null 2>&1 || { echo >&2 "pdftk is required but it's not installed. Exiting."; exit 1; } | |
count_letters() { | |
echo "$1" | grep -o -i '[a-z]' | wc -l |
OlderNewer