Skip to content

Instantly share code, notes, and snippets.

View thesobercoder's full-sized avatar
😎
Talk is cheap show me the code!

Soham Dasgupta thesobercoder

😎
Talk is cheap show me the code!
View GitHub Profile
@lionofdezert
lionofdezert / CasecadeDelete.sql
Created August 2, 2012 19:38
Casecade Delete in SQL Server
USE AdventureWorks
GO
--============== Supporting function dbo.udfGetFullQualName
IF OBJECT_ID('dbo.udfGetFullQualName') IS NOT NULL
DROP FUNCTION dbo.udfGetFullQualName
GO
CREATE FUNCTION dbo.udfGetFullQualName ( @ObjectId INTEGER )
@AWMooreCO
AWMooreCO / AdvancedWindowSnap.ahk
Last active July 9, 2024 03:29
Advanced Window Snap is a script for AutoHotKey that expands upon Windows built-in window-snapping hotkeys.
/**
* Advanced Window Snap
* Snaps the Active Window to one of nine different window positions.
*
* @author Andrew Moore <[email protected]>
* @version 1.0
*/
/**
* SnapActiveWindow resizes and moves (snaps) the active window to a given position.
public class WhereBuilder
{
private readonly IProvider _provider;
private TableDefinition _tableDef;
public WhereBuilder(IProvider provider)
{
_provider = provider;
}

Objective

The goal is being able to mix your microphone and desktop audio into a single track, while leaving Discord out of the equation. This allows you to stream your desktop audio and talk while in a call, without your partners hearing themselves.

Voicemeeter Setup

Download Voicemeeter

Voicemeeter Banana

@ScriptingSquirrel
ScriptingSquirrel / install-kubernetes-dashboard-ingress-enabled.md
Last active March 4, 2022 08:48
Install Ingress-enabled kubernetes-dashboard using Helm

Problem

$ helm install kubernetes-dashboard stable/kubernetes-dashboard --namespace MY_NAMESPACE --set ingress.enabled=true --set ingress.hosts={MYDASHBOARD.EXAMPLE.COM} --set-string ingress.annotations."nginx\.ingress\.kubernetes\.io/secure-backends"="true"
Error: UPGRADE FAILED: failed to create patch: failed to get versionedObject: unable to convert unstructured object to extensions/v1beta1, Kind=Ingress: unrecognized type: string

NB: A fix for the --set-string flag is on the way: helm/helm#4142

Workaround

@miguelmota
miguelmota / command_exists.go
Last active October 31, 2024 04:48
Golang check if command exists
package main
import (
"log"
"os/exec"
)
func main() {
path, err := exec.LookPath("ls")
if err != nil {
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active October 10, 2024 22:24
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@fworks
fworks / install-zsh-windows-git-bash.md
Last active November 8, 2024 05:43
Zsh / Oh-my-zsh on Windows Git Bash
@phenomnomnominal
phenomnomnominal / ParseDate.ts
Created October 3, 2020 23:22
TypeScript Template Types Date Validator
// Check it out here:
https://www.typescriptlang.org/play?ts=4.1.0-dev.20201001#code/C4TwDgpgBAcgrgWwEYQE4GcoF4oHIAMuUAPngIxGm4BMleAzHbgCxMCsTAbEwOxMAcTAJy4A3AChQkWAHsAdgC00M7FACiADwDGAGzgATCAB54yNOgA0eQgD4Jk8NACaEAIapVAAwAkAb1MoGAC+fgHmIf6IgegRYcGeElLQALLywAAWmDie+KHySqgyQZ4k5ISluGQUFWS0iY5QACKuIFlQPr4ETNVUtLH5ysUV9OVU9BT2SVAAEjJwGF65kWbxpZ5koVHhJb2jeNQ9+7QV1IwnrPXSCvIQs-NtMAOFa0uPioM7Zd2HlbQO0skAJZyODACBtDpdGpMY5jJisCocWJbeKXaAAZQgWnk+jaQJBYPQaKgQJ0OkB6CxOIhmxWMVp0WRdOKkwa1zkEAACqgIAAzQEaVS4ADUTAAtGJxP9oM0wZz3JS1KhCqgjMlwehXABzaAQDRguS4qDoYCoYFamyqXxQNAqgBcJI12ugQVZ0llEAAKoCEMZxFAA1BPTb9RBDZgTWa5FrxJacP7A8G9QajR1gby0E1XGDvb6ggo-OnM+yIEMAPxQBOBwPyjAQD25iAlowNn0QKwly12qtBkMpzBpuQZjwe8s96u1ymt32PZseruV6seycQJUqoyeacQB0ASTkADdXOT9Fmc22HX5PcU7FKpiut82e1v0aa+2GjZHzRYeyWXx5k++Eaml+PYrvoW6qPe2Zem2s43C20GNn+NjfhOCoQPoJaQehza-qaNixthdbgYhbZvuGp4wb6f5QGW441uhmE3ORRp4R4dHVpxgYdGBW75n4YElkM3ZcQGgnMSJDHEVubrQFBZ4zjIj5LqRilsSxQFRjGcaLoGW5wRyNEARRg7DpRQSeoWQ6Zo25a6Vx8lUcYHpWI2XZPqpEAGRARmhiZVlmaOJQcaJjkIWCC4eXK6FrjIqqeI5jb