Skip to content

Instantly share code, notes, and snippets.

@just-jeb
just-jeb / embed-gist-dark-theme.css
Last active October 24, 2024 15:18
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": "",
@hugmanrique
hugmanrique / jekyll-transclude.rb
Last active October 7, 2024 17:41
Jekyll Liquid block that allows includes with content
# frozen_string_literal: true
# Based on https://github.com/jekyll/jekyll/blob/master/lib/jekyll/tags/include.rb,
# provides a transclude block that maintains Jekyll include semantics. Files can
# pass parameters to transcludes via the `include` object, with the addition of
# {{ include.content }} which includes the block content.
#
# Transcludes must be located in Jekyll's _includes dir.
#
# Example:
# 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 October 23, 2024 02:12
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 July 11, 2024 18:24
"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