Skip to content

Instantly share code, notes, and snippets.

View engineering87's full-sized avatar

Francesco Del Re engineering87

View GitHub Profile
@engineering87
engineering87 / update_repo.sh
Last active July 24, 2024 10:43
Simple bash script for recursive git updating of local repositories
#!/bin/bash
# Function to perform git pull on a directory if it contains a git repository
update_repository() {
if [ -d "$1/.git" ]; then
echo "Update repository in $1"
cd "$1" && git pull && cd - > /dev/null
else
echo "The $1 directory does not contain a Git repository"
fi
@engineering87
engineering87 / TSQL-to-POCO.sql
Last active July 24, 2024 10:43 — forked from joey-qc/TSQL-to-POCO
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @pos int
declare @Stype varchar(50)
declare @isnullable varchar(1)
declare @Sproperty varchar(200)