Skip to content

Instantly share code, notes, and snippets.

View hasit's full-sized avatar

Hasit Mistry hasit

View GitHub Profile
@britishtea
britishtea / jump.fish
Last active April 5, 2016 01:03
Bookmarking directories in the fish shell. Copy the file to $fish_function_path (~/.config/fish/functions by default) as jump.fish to install.
function jump -d "Jumps to a marked directory"
# If $JUMP_PATH isn't set, use a default (~/.config/jump).
if set -q $JUMP_PATH
set JUMP_PATH $HOME/.config/jump
end
# If the $JUMP_PATH directory doesn't exist, create it.
if not test -d $JUMP_PATH
mkdir -p $JUMP_PATH
end
@paulbbauer
paulbbauer / main.js
Last active October 8, 2024 17:08
Electron oAuth Authentication with GitHub API
// based on:
// http://iamemmanouil.com/blog/electron-oauth-with-github/
// https://github.com/ekonstantinidis/gitify
// this version uses https rather than superagent
var querystring = require('querystring');
var https = require("https");
// Your GitHub Applications Credentials
@tobias
tobias / setjdk.fish
Created July 12, 2016 18:16
Manage multiple java versions on the mac from the fish shell
function setjdk
if test -n "$JAVA_HOME"
removeFromPath "$JAVA_HOME/bin"
end
set -gx JAVA_HOME (/usr/libexec/java_home -v $argv[1])
set -gx PATH $JAVA_HOME/bin $PATH
end
function removeFromPath
set -l idx 0
@hasit
hasit / buffalo.fish
Last active May 13, 2020 14:11
Tab completion support for Buffalo in fish shell
# fish completion for buffalo
function __fish_buffalo_grifts
command grift list $argv ^/dev/null | string match -r '\s.*?#' | string trim -c ' #' | string trim
end
# general
complete -xc 'buffalo' -n '__fish_use_subcommand' -s h -l help -d 'help for buffalo'
# build
@r-darwish
r-darwish / theme.yml
Created December 27, 2018 08:25
Alacritty One Dark Theme
colors:
# Default colors
primary:
background: '0x1e2127'
foreground: '0xabb2bf'
# Bright and dim foreground colors
#
# The dimmed foreground color is calculated automatically if it is not present.
@ameenkhan07
ameenkhan07 / FB-PE-InterviewTips.md
Last active May 1, 2025 01:53
Facebook Production Engineering Interview

What to Expect and Tips

• 45-minute systems interview, focus on responding to real world problems with an unhealthy service, such as a web server or database. The interview will start off at a high level troubleshooting a likely scenario, dig deeper to find the cause and some possible solutions for it. The goal is to probe your knowledge of systems at scale and under load, so keep in mind the challenges of the Facebook environment.
• Focus on things such as tooling, memory management and unix process lifecycle.

Systems

More specifically, linux troubleshooting and debugging. Understanding things like memory, io, cpu, shell, memory etc. would be pretty helpful. Knowing how to actually write a unix shell would also be a good idea. What tools might you use to debug something? On another note, this interview will likely push your boundaries of what you know (and how to implement it).

Design/Architecture 

Interview is all about taking an ambiguous question of how you might build a system and letting

;; Taken from https://andreyor.st/posts/2020-05-10-making-emacs-tabs-look-like-in-atom/
;; https://github.com/andreyorst/dotfiles/blob/740d346088ce5a51804724659a895d13ed574f81/.config/emacs/README.org#tabline
(defun my/set-tab-theme ()
(let ((bg (face-attribute 'mode-line :background))
(fg (face-attribute 'default :foreground))
(hg (face-attribute 'default :background))
(base (face-attribute 'mode-line :background))
(box-width (/ (line-pixel-height) 4)))
(set-face-attribute 'tab-line nil