Skip to content

Instantly share code, notes, and snippets.

@just-jeb
just-jeb / embed-gist-dark-theme.css
Last active June 1, 2024 23:02
Dark theme gist embed for blog
<style>
/* https://github.com/lonekorean/gist-syntax-themes */
@import url('https://cdn.rawgit.com/lonekorean/gist-syntax-themes/d49b91b3/stylesheets/idle-fingers.css');
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
body {
font: 16px 'Open Sans', sans-serif;
}
body .gist .gist-file {
border-color: #555 #555 #444
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@raresteak
raresteak / WindowsDesktopBackup.bat
Last active June 13, 2021 05:45
WindowsDesktopBackup.bat
Rem Windows incremental backup of source to destination
Rem /D Copies files changed
Rem /E Copies directories and subdirectories, including empty ones.
Rem /Y Suppresses prompting to confirm you want to overwrite
Rem /I If destination does not exist and copying more than one file,assumes that destination must be a directory.
xcopy C:\Users\%username%\Documents\* E:\Backup\%computername%\%username%\Documents /D /E /Y /I
xcopy C:\Users\%username%\Desktop\* E:\Backup\%computername%\%username%\Desktop /D /E /Y /I
xcopy C:\Users\%username%\Downloads\* E:\Backup\%computername%\%username%\Downloads /D /E /Y /I
@dcts
dcts / workbench.colorCustomizations.json
Created April 14, 2020 16:51 — forked from jacklorusso/workbench.colorCustomizations.json
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
# Better work with oh-my-pwsh
# Put below content into $PROFILE
function su-fun {Start-Process powershell -Verb runAs -argumentlist '-NoExit', "cd '$pwd';", "$args"}
set-alias su su-fun
set-alias sudo su-fun
$env:PYTHONIOENCODING="utf-8"
# Remove curl alias
If (Test-Path Alias:curl) {Remove-Item Alias:curl}
@MrGrigri
MrGrigri / md-color-palette.css
Last active February 15, 2024 12:25
Material Design Color Palette in CSS Variable Form
:root {
--material-color-red: #f44336;
--material-color-red-50: #ffebee;
--material-color-red-100: #ffcdd2;
--material-color-red-200: #ef9a9a;
--material-color-red-300: #e57373;
--material-color-red-400: #ef5350;
--material-color-red-500: var(--material-color-red);
--material-color-red-600: #e53935;
--material-color-red-700: #d32f2f;
@rwb27
rwb27 / shortcut.ps
Created January 24, 2019 15:15
How to create a shortcut in Windows 10 from PowerShell
$ws = New-Object -ComObject WScript.Shell;
$s = $ws.CreateShortcut('C:\Users\Public\Desktop\RDWorksV8.lnk');
$s.TargetPath = 'C:\Program Files (x86)\RDWorksV8\RDWorksV8.exe';
$s.save()
@hamzahamidi
hamzahamidi / open-cmder-here.md
Last active February 23, 2024 01:30
"Open Cmder Here" in context menu

"Open Cmder Here" in context menu

Edit 04/2021:

As of the lastest versions, just execute the following command .\cmder.exe /REGISTER ALL per Documentation.

Original Solution

To add an entry in the Windows Explorer context menu to open Cmder in a specific directory, paste this into a OpenCmderHere.reg file and double-click to install it.

@f3l3gy
f3l3gy / download-latest-release.ps1
Last active November 8, 2023 07:12 — forked from MarkTiedemann/download-latest-release.ps1
Download latest GitHub release via Powershell
# Download latest dotnet/codeformatter release from github
$repo = "dotnet/codeformatter"
$file = "CodeFormatter.zip"
$releases = "https://api.github.com/repos/$repo/releases"
Write-Host Determining latest release
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$tag = (Invoke-WebRequest -Uri $releases -UseBasicParsing | ConvertFrom-Json)[0].tag_name
@r3t3ch
r3t3ch / crc32.ps1
Created June 27, 2018 16:20
Powershell CRC32 Function
Add-Type -TypeDefinition @"
// Copyright (c) Damien Guard. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
/// <summary>