Skip to content

Instantly share code, notes, and snippets.

View bogdanscarwash's full-sized avatar
🎯
Focusing

Percy R. bogdanscarwash

🎯
Focusing
  • Kansas
View GitHub Profile
@bogdanscarwash
bogdanscarwash / webdav-server.sh
Created April 14, 2025 15:16
Universal WebDAV Server Setup Script for Debian 12. Works on both standard Debian 12 and WSL environments
#!/bin/bash
# Universal WebDAV Server Setup Script for Debian 12
# Works on both standard Debian 12 and WSL environments
# Exit on any error
set -e
# Configuration variables
WEBDAV_DIR="/var/www/webdav"
WEBDAV_CONF="/etc/apache2/sites-available/webdav.conf"
@bogdanscarwash
bogdanscarwash / gcp_vertex_search_utils.py
Last active January 28, 2025 17:02
helper methods for GCP Vertex AI Search
# pip install --upgrade google-cloud-discoveryengine humanize
## Install this before running
import humanize
import time
import re
from typing import List, Optional
from google.api_core.client_options import ClientOptions
from google.cloud import discoveryengine_v1beta as discoveryengine
@bogdanscarwash
bogdanscarwash / autoflex.py
Created January 31, 2024 02:27
automating azure pipelines: bicep tabular translation in python
import pyodbc
import json
# Connect to your database - don't hardcode the creds!
conn = pydobc.connect(database="your_database", user="your_username", password="your_password", host="your_host", port="your_port")
cur = conn.cursor()
# List of your tables
tables = ["table1", "table2", "table3", "table4", "table5", "table6", "table7", "table8", "table9"]
@bogdanscarwash
bogdanscarwash / gist:5a03e9f6f35b1f868c6e9ae01f6ce7a0
Created January 23, 2024 21:16
synapse cursor to check multiple tables
DECLARE @TableName nvarchar(128);
DECLARE @Command nvarchar(500);
DECLARE TableCursor CURSOR FOR
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'myschema';
OPEN TableCursor;
FETCH NEXT FROM TableCursor INTO @TableName;
@bogdanscarwash
bogdanscarwash / tweet_dumper.py
Created June 13, 2022 18:16 — forked from brenorb/tweet_dumper.py
A Python 3.+ script to download all of a user's tweets into a csv.
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""