Skip to content

Instantly share code, notes, and snippets.

View rippo's full-sized avatar

Richard Wilde rippo

View GitHub Profile
@smeijer
smeijer / github-sync.sh
Created February 6, 2024 17:43
sync github repositories
#! /usr/bin/env node
import fs from 'fs';
import { promisify } from 'util';
import path from 'path';
import { spawn } from 'child_process';
const fsExists = promisify(fs.exists);
if (!process.env.GITHUB_TOKEN) throw new Error("process.env.GITHUB_TOKEN is required");
if (!process.env.GITHUB_USER) throw new Error("process.env.GITHUB_USER is required");
@rippo
rippo / GitVersionIncrement.ps1
Last active August 9, 2021 15:31 — forked from nbarnwell/GitVersionIncrement.ps1
Simple PowerShell script to create the appropriate next tag on a git repo
function New-Tag {
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$true)]
[string] $Tag)
process {
if ($PSCmdlet.ShouldProcess("git tag $Tag")) {
Write-Verbose "git tag $Tag"
git tag $Tag
}
@rippo
rippo / generate.sql
Last active February 15, 2018 15:09
Generate c# clsss from DB table
declare @TableName sysname = 'TableName'
declare @Result varchar(max) = 'public class ' + @TableName + '
{'
select @Result = @Result + '
public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; }'
from
(
select
replace(col.name, ' ', '_') ColumnName,