Skip to content

Instantly share code, notes, and snippets.

View Joaquin6's full-sized avatar
🏠
Working from home

Joaquin Briceno Joaquin6

🏠
Working from home
  • Overland Park, KS
View GitHub Profile
@Joaquin6
Joaquin6 / package-json-build-number.ps1
Created August 30, 2021 12:13 — forked from ediblecode/package-json-build-number.ps1
Powershell script to parse a package.json version and use as the build number in TeamCity
$version = (Get-Content package.json) -join "`n" | ConvertFrom-Json | Select -ExpandProperty "version"
$buildCounter = "%build.counter%"
$buildNumber = "$version.$buildCounter"
Write-Host "##teamcity[buildNumber '$buildNumber']"
@Joaquin6
Joaquin6 / powershellsnippetvscode.json
Created August 28, 2020 17:46 — forked from kasuken/powershellsnippetvscode.json
PowerShell snippet for VS Code
{
"Condition statement": {
"prefix": "cond",
"body": [
"${_} { ${0}; break }"
],
"description": "Switch condition statement"
},
"Condition single quoted string statement": {
@Joaquin6
Joaquin6 / README.md
Last active August 6, 2020 04:39 — forked from chrisdhanaraj/osx.ahk
Autohotkey script to bring OSX keybinds to Windows

Mapping your macOS keybinds to Windows

Maybe Brad Frost’s horror story about the new MacBook Pro worried you or maybe #davegoeswindows convinced you — but, long story short, you bit the bullet and went Windows. Hopefully, you found Owen William’s great post to setting up your perfect Windows developer environment, but there’s just… just one thing that’s bothering you.

Who in the world wants to use their pinky finger to use their main modifier key? The Control button is so far away! The Command button placement was perfect! Not to worry, with a combination of Sharp Keys and AutoHotkey you can simulate the same keyboard environment as you’re used to.

TL;DR

  1. Use Sharp Keys to remap Ctrl and Alt
  2. Use AutoHotkey + [this starter script](https://gist.github.com/Joaquin6/3d3f37586839
@Joaquin6
Joaquin6 / Logging_Functions.ps1
Created June 22, 2020 23:00 — forked from 9to5IT/Logging_Functions.ps1
PowerShell: Logging Functions
Function Log-Start{
<#
.SYNOPSIS
Creates log file
.DESCRIPTION
Creates log file with path and name that is passed. Checks if log file exists, and if it does deletes it and creates a new one.
Once created, writes initial logging data
.PARAMETER LogPath
@Joaquin6
Joaquin6 / Logging_Functions.ps1
Created June 22, 2020 23:00 — forked from 9to5IT/Logging_Functions.ps1
PowerShell: Logging Functions
Function Log-Start{
<#
.SYNOPSIS
Creates log file
.DESCRIPTION
Creates log file with path and name that is passed. Checks if log file exists, and if it does deletes it and creates a new one.
Once created, writes initial logging data
.PARAMETER LogPath
@Joaquin6
Joaquin6 / post-merge
Created April 12, 2020 21:28 — forked from GianlucaGuarini/post-merge
Git hook that gets triggered after any 'git pull' whenever one of the files specified has changed. Useful to update any web application dependency using bower npm or composer
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# forked by Gianluca Guarini
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep -E --quiet "$1" && eval "$2"
}
@Joaquin6
Joaquin6 / post-merge
Last active April 12, 2020 21:32 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` or `git checkout` if a specified file was changed
# Run `chmod +x post-checkout` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && echo " * changes detected in $1" && echo " * running $2" && eval "$2"
using NuGet.Common;
using NuGet.Configuration;
using NuGet.Frameworks;
using NuGet.Packaging;
using NuGet.Packaging.Core;
using NuGet.Packaging.Signing;
using NuGet.Protocol;
using NuGet.Protocol.Core.Types;
using NuGet.Resolver;
using NuGet.Versioning;
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
@Joaquin6
Joaquin6 / osx-brew-gnu-coreutils-man.sh
Created August 2, 2019 05:19 — forked from quickshiftin/osx-brew-gnu-coreutils-man.sh
Running GNU coreutils via Homebrew on your Mac? Here's a one-liner to get the manpages working!
# Short of learning how to actually configure OSX, here's a hacky way to use
# GNU manpages for programs that are GNU ones, and fallback to OSX manpages otherwise
alias man='_() { echo $1; man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1 1>/dev/null 2>&1; if [ "$?" -eq 0 ]; then man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1; else man $1; fi }; _'