Skip to content

Instantly share code, notes, and snippets.

View jonyeezs's full-sized avatar
💼
Focusing on work - maybe slow to respond

Jonathan Yee jonyeezs

💼
Focusing on work - maybe slow to respond
View GitHub Profile
@jonyeezs
jonyeezs / azure-pipelines.yml
Last active January 19, 2024 05:52
Azure DevOps pipeline from PR to Release on merge to main
stages:
- stage: BuildPhase
condition: |
and(eq(variables['Build.Reason'], 'PullRequest'), in(variables['System.PullRequest.TargetBranch'], 'refs/heads/main'))
displayName: Build Application
jobs:
- job: build_bundle
steps:
- stage: PRCheck
@jonyeezs
jonyeezs / install
Last active August 4, 2022 02:43
Installation file for dotfiles
echo "Hello! Building up your computer now...";
git clone --bare https://github.com/jonyeezs/.dotfiles.git $HOME/.dotfiles
function config {
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@
}
function dotbackup {
echo "Backing up $1..."
mkdir -p .dotfiles-backup/$(dirname $1)
mv $1 .dotfiles-backup/$1
@jonyeezs
jonyeezs / settings.json
Created March 23, 2019 04:22
vscode metrics using emojis
{
"codemetrics.basics.ComplexityLevelExtremeDescription": "🌋",
"codemetrics.basics.ComplexityLevelHighDescription": "😕",
"codemetrics.basics.ComplexityLevelLowDescription": "😎",
"codemetrics.basics.ComplexityLevelNormalDescription": "😎",
"codemetrics.basics.ComplexityTemplate": "Complexity is {0} {1}",
// if my code isn't complex don't add noise to my editor
"codemetrics.basics.CodeLensHiddenUnder": 5,
// color following the background of my editor coz the box at the end of my line was annoying me
"codemetrics.basics.ComplexityColorHigh": "#212836",
@jonyeezs
jonyeezs / UserConfiguration.json
Last active November 22, 2018 13:55
uhk configuration
{
"userConfigMajorVersion": 4,
"userConfigMinorVersion": 0,
"userConfigPatchVersion": 0,
"deviceName": "Jonathan's",
"doubleTapSwitchLayerTimeout": 250,
"iconsAndLayerTextsBrightness": 58,
"alphanumericSegmentsBrightness": 58,
"keyBacklightBrightness": 133,
"mouseMoveInitialSpeed": 4,

Keybase proof

I hereby claim:

  • I am jonyeezs on github.
  • I am jonyeezs (https://keybase.io/jonyeezs) on keybase.
  • I have a public key ASC8JHluId2uL70AkaI3mIM04fy0wGyywxTWRu4tjDtEjwo

To claim this, I am signing this object:

@jonyeezs
jonyeezs / nvm-node.md
Last active January 21, 2019 06:03
Recommended Node Dev Setup

node with NVM + useful cli plugins

A Node version manager. Useful if you need to support previous versions

Installation

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
@jonyeezs
jonyeezs / rbenv-ruby-build.md
Last active February 19, 2023 05:43
Recommended Ruby Dev Setup

rbenv & Ruby-build + Bundler

Manage ruby installion and environment for a non-fuss and non-headache development on multiple supported Ruby versions.

Manage your Ruby version for your application and global environment.

  • Uses environment variable to maintain so it's easily configurable.
  • Application specific versioning.
@jonyeezs
jonyeezs / populateInput.js
Created August 22, 2017 02:10
Using DOM to populate rows of inputs
// We have a table with the last column being to inputs.
// We want to put in the same values on all rows.
// This will add in values to inputs on the last column of a row in a table
// The premise is that when there are two inputs in the last column,
// we know that's where we want to add the values
// Use call to "borrow" the forEach function on HTMLCollection
Array.prototype.forEach.call(document.getElementsByTagName('tbody')[1].getElementsByTagName('tr'), function(tr) {
// We know the last column is the forth and that will always be where the inputs are
var lastTD = tr.getElementsByTagName('td')[3];
@jonyeezs
jonyeezs / Microsoft.Powershell_profile.ps1
Last active August 20, 2017 23:24
My Powershell profile: setting up posh-git prompt | conemu | posh-docker | powerls | PSReadLine | and some aliases
# ensure you have your public key in C:\Users\<account>\.ssh
Start-SshAgent
function prompt
{
$origLastExitCode = $LASTEXITCODE
# draw out the directory then posh git prompt followed by ">"
Write-Host $ExecutionContext.SessionState.Path.CurrentLocation -NoNewline
Write-VcsStatus
@jonyeezs
jonyeezs / fakeproviders.js
Last active June 3, 2017 13:38
Faking providers
let customerServiceMock = {/*some fake functions that will be called*/};
angular.mock.module('app', function($provide) {
$provide.service('customerService', customerServiceMock);
});
// or
let customerServiceMock = jasmine.createSpyObj('customerService', ['complain']);