Skip to content

Instantly share code, notes, and snippets.

View nickpalenchar's full-sized avatar
The fizz in your soda

Nick Palenchar nickpalenchar

The fizz in your soda
View GitHub Profile
@nickpalenchar
nickpalenchar / blocklist.json
Created October 6, 2022 13:00
Hide low quality, ad-ridden coding sites
[
{
"domainName": "geeksforgeeks.org",
"display": "FULL_HIDE"
},
{
"domainName": "www.golangprograms.com",
"display": "FULL_HIDE"
},
{
@nickpalenchar
nickpalenchar / productpreformance.md
Created September 18, 2019 15:02
Product performance (Facebook)

Performance has a direct and clear performance on user engagment

Infrastructure Performance

Workflows for performance investegation:

  • offence - identifying what is slow and what can be improved
  • defence -

Trace analysises can be outliers (there's a LOT of moving parts). Only when you aggregate traces do you get a good picture of what the performance might look like.

@nickpalenchar
nickpalenchar / vanishing10ball.md
Last active May 26, 2019 20:36
Vanishing 10-ball - a solitaire pool game for beginner/intermediate players

VANISHING 10-BALL

A solitaire pool game for beginner/intermediate players.

OBJECTIVE

Balls 1-10 are racked in a triangle, with the 1-ball in front and 10-ball in center. The object is to pocket all 10 balls, being sure to strike the lowest ball on the table first.

VANISHING BALLS

After the break, you must pocket the lowest ball (target ball) on the table in no more than 11 strokes minus the ball's value (i.e. 10 strokes for the 1-ball, 9 strokes for the 2 ball... 1 stroke for the 10 ball). Every stroke is added to your stroke count, which starts at 0 for each new target ball. If after the final stroke alloted you do not pocket the ball, it is removed from the table and considered missed. The target ball is the next lowest ball on the table, with your stroke count resets to 0.

SCORING

# add to your .bashprofile or .bashrc for branch display and git autocompletion.
# add the file at https://github.com/nickpalenchar/swanked-out-bash/blob/master/.git-completion.bash to the root of your $HOME directory.
export PS1="\u\[\033[0;35m\] \$(abbrv_wd \w)\[\033[32m\]\$(parse_git_branch)\[\033[33m\] $\[\033[00m\] "
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# add these to your .bash_profile or .bashrc
# gac - commit everything to current branch
# gpr - push everything to current branch (on origin)
# gcb <newbranchname> - create a new branch from current branch and switch to it.
gac() { git add -A && git commit -am "$1"; }
alias gpr="gpb $@"
gpb() {
execute pathogen#infect()
syntax on
filetype plugin indent on
syntax enable
set background=dark
let g:solarized_termcolors=256
colorscheme badwolf
set number
" Whitespace
let recordsAfter2000 = records.map(standardizeRecords)
.filter(filterBefore2000);
// more detail (if you want it!)
function standardizeRecords (record) {
if (record.rlsDate) {
record.date = record.rlsDate;
delete record.rlsDate;
}
if (record.releaseDate) {
let recordsAfter2000 = records.map((record, i) => {
if (record.rlsDate) {
  record.date = record.rlsDate;
  delete record.rlsDate;
  }
  if (record.releaseDate) {
  record.date = record.releaseDate;
  delete record.releaseDate;
  }
  return record;
@nickpalenchar
nickpalenchar / README.md
Created October 6, 2017 13:44 — forked from pdanford/README.md
Applescript to launch iTerm2 Version 3+ from OS X Finder via keyboard shortcut or Toolbar

Description

Based on info from http://peterdowns.com/posts/open-iterm-finder-service.html but with modified behavior and fixed to work with iTerm2 version 3 or later. It will not work with older versions of iTerm. The modified behavior is to open a new terminal window for each invocation instead of reusing an already open window. Update - The original author released a build script for the newer iTerm2 versions at https://github.com/peterldowns/iterm2-finder-tools that keeps the original behavior of reusing an open iTerm2 window.

To open iTerm2 at selected folder with keyboard shortcut

  1. Run Automator, select a new Service
  2. Select Utilities -> Double click ‘Run AppleScript’
  3. Service receives selected 'folders' in 'finder.app'
  4. Paste script:
@nickpalenchar
nickpalenchar / .vimrc
Created June 5, 2017 14:39
My .vimrc
" This is pretty much completely copied from
" https://dougblack.io/words/a-good-vimrc.html
" I take no credit. This is for personal/educational use
syntax enable
set background=light
colorscheme molokai
set tabstop=4
set softtabstop=4