Skip to content

Instantly share code, notes, and snippets.

@inchoate
inchoate / readme.md
Last active April 24, 2024 09:37
Open clicked URLs into a particular Google Chrome profile

Problem

When I click on links from Slack or Outlook on MacOS they open in seemingly random browser windows/profiles. This is annoying.

Solution

Open links in a particular google chrome profile window. Be less annoyed.

  1. In Chrome, visit chrome://version and find the desired profile name. Mine was Default. Copy that profile's directory name, like Profile 2 or Default, not the profile's vanity name you see when you click on your profile icon in the browser.
  2. Install Finicky: brew install finicky. After install it should be running and you should see the icon in the upper toolbar.
  3. From the Finicky Toolbar Item, click > Config > Create New
  4. Edit the new file ~/.finicky and make it look something like this, filling in your profile name:
@rsp9u
rsp9u / client.log
Last active October 18, 2022 08:59
OpenSSH client disconnecting
OpenSSH_8.0p1, OpenSSL 1.1.1b 26 Feb 2019
debug1: Reading configuration data /home/rsp9u/.ssh/config
debug1: /home/rsp9u/.ssh/config line 1: Applying options for raspi
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname 192.168.63.10 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.63.10 [192.168.63.10] port 50022.
debug1: Connection established.
debug1: identity file /home/rsp9u/.ssh/id_rsa type 0
debug1: identity file /home/rsp9u/.ssh/id_rsa-cert type -1
@mikemichaelis
mikemichaelis / gist:4f6d62a03300a24e97c1d19b9413371e
Created April 19, 2017 14:30
Setup p4merge as git mergetool in Windows (cmd & PS)
git config --global merge.tool p4merge
git config --global mergetool.p4merge.path "C:/Program Files/Perforce/p4merge.exe"
@JoelQ
JoelQ / README.md
Created October 15, 2015 13:50
Using Shell Scripts for a Better User Experience (source for https://robots.thoughtbot.com/improving-user-experience-with-shell-scripts)

Server scripts

This is the source for the scripts discussed in https://robots.thoughtbot.com/improving-user-experience-with-shell-scripts

Both scripts are in the bin/ directory of the repo that contains all the markdown documents for blog posts. Users run bin/server and everything is automatically set up for them to view a local preview of the blog. bin/server-setup is a dependency of bin/server and is never run directly by users.

Maitre-d is the name of the "blog engine" discussed in the article.

package org.xtext.example.mydsl
import org.eclipse.emf.ecore.EObject
import org.eclipse.xtext.AbstractElement
import org.eclipse.xtext.Alternatives
import org.eclipse.xtext.CharacterRange
import org.eclipse.xtext.EOF
import org.eclipse.xtext.GrammarUtil
import org.eclipse.xtext.Group
import org.eclipse.xtext.Keyword
@brianr
brianr / example.json
Last active March 14, 2018 16:14
Rollbar grouping config to include the exception message for node.js errors with class name 'Error'
[{
"condition": {"all": [
{"path": "body.trace.exception.class", "eq": "Error"},
{"path": "framework", "eq": "node-js"}
]},
"title": "{{default_title}}",
"fingerprint": "{{default_fingerprint}}-{{body.trace.exception.message}}"
}]
anonymous
anonymous / danstheme.zsh-theme
Created April 20, 2015 01:30
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
function get_pwd() {
print -D $PWD
}
function put_spacing() {
@goyalankit
goyalankit / bash_to_zsh_history.rb
Last active October 28, 2023 05:07
Import bash history to zsh history.
#################################################################
# = This script transfers bash history to zsh history
# = Change bash and zsh history files, if you don't use defaults
#
# = Usage: ruby bash_to_zsh_history.rb
#
# = Author: Ankit Goyal
#################################################################
# change if you don't use default values
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 6, 2024 02:17
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@Experiment5X
Experiment5X / Instruction2Bytecode.py
Created April 11, 2014 18:14
Convert an assembly instruction into its bytecode. It uses gas and otool, so this will only work on OS X, but it'd be pretty easy to modify it for linux.
# USAGE INSTRUCTIONS
# It's an interactive shell, where you have the following options...
# - Just type in an assembly instruction in Intel syntax, and it'll spit out the bytecode
# - Change the syntax to AT&T with the att command
# - Change the syntax back to Intel with the intel command
# - Quit with the q command
import os
import sys
import tempfile
import subprocess