Skip to content

Instantly share code, notes, and snippets.

View kodybrown's full-sized avatar
💭
I may be slow to respond.

Kody Brown kodybrown

💭
I may be slow to respond.
View GitHub Profile
@quangdinh
quangdinh / gammastep.sh
Last active March 26, 2025 17:01
Sway / Waybar / Wofi / Swaylock config & styles
#!/usr/bin/env bash
pid=$(pgrep gammastep)
if [[ $1 = "toggle" ]]; then
if pgrep -x "gammastep" > /dev/null; then
kill -9 $(pgrep -x "gammastep");
else
gammastep -O ${GAMMASTEP_NIGHT:-3500} &
fi
@rossarioking
rossarioking / Transcript.ps1
Created March 7, 2020 18:08
Creating PowerShell Transcripts #PowerShell
#Create Folder where transcript files will be saved,
md C:\Transcripts
#This captures all of the console data and outputs it to a transcript file.
Start-Transcript -path .\Transcripts\Mytranscript.txt -append
# All Data inbetween these commands will be written to the trascript file.
#Stops recording Transcript input.
@rollwagen
rollwagen / powershell_file_io_upload.ps1
Last active May 11, 2023 23:29
powershell snippets #powershell #upload
$sourceFilePath = "/etc/apt/archive"
$siteAddress = "https://file.io/?expires=1w"
$webClient = New-Object System.Net.WebClient
$response
try {
$response = $webClient.UploadFile($siteAddress,$sourceFilePath)
} catch {
Write-Host $_
}
[System.Text.Encoding]::ASCII.GetString($response)
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active April 14, 2025 11:50
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@matdcooper
matdcooper / gitflow-cheatsheet.md
Created January 10, 2019 14:50
Git-Flow Cheat-Sheet

Creating git repo

  • Create directory
  • Go into new directory
  • Create bare repo
    • git init --bare
  • Clone repo somewhere
    • git clone <repo>
  • Go into repo folder
  • Create .gitignore file
@secretGeek
secretGeek / Program.cs
Created August 30, 2017 12:47
simulate Alt-Enter in parent console from windows app
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
namespace PaulBettsWIN32
{
static class Program
{
[STAThread]
static void Main(string[] args)
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 20, 2025 23:02
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security
@gschema
gschema / Git - how to temporarily ignore and unignore file changes.md
Last active May 15, 2023 03:34
How to temporarily ignore and unignore file; check which files are ignored

How to temporarily ignore/unignore file changes in Git?

ignore:

git update-index --assume-unchanged <file>

unignore:

git update-index --no-assume-unchanged 
@deevus
deevus / build.ps1
Created April 21, 2015 07:22
Cross Compile GNU Hello using Docker
$pkg = "hello-2.10"
$file = "$pkg.tar.gz"
# get dockerfile
invoke-webrequest "https://raw.githubusercontent.com/deevus/docker-mxe/develop/Dockerfile" -outfile "Dockerfile"
# get package
if(!(test-path $file)) {
invoke-webrequest "http://gnu.mirror.uber.com.au/hello/$file" -outfile $file
}
@dhanifudin
dhanifudin / autosave.vim
Last active December 20, 2015 16:00
Automatically save and remove trailing whitespace for vim
" Declare ignore filetype here
let g:ignore_autosave = 'tex'
function AutoSave()
if &modifiable == 1 && &readonly == 0
\ && expand('%') != ''
\ && &buftype != 'nofile'
%s/\s\+$//e
if &filetype != g:ignore_autosave
update