Skip to content

Instantly share code, notes, and snippets.

View hasit's full-sized avatar

Hasit Mistry hasit

View GitHub Profile
;; 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
@ameenkhan07
ameenkhan07 / FB-PE-InterviewTips.md
Last active July 1, 2024 00:15
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

@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.
@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
@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
@paulbbauer
paulbbauer / main.js
Last active February 8, 2024 10:42
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
@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
@levi
levi / riot_esports_api.md
Last active November 8, 2023 16:38
Riot LoL eSports Unofficial API Documentation
@paulmach
paulmach / serve.go
Last active June 20, 2024 15:14
Simple Static File Server in Go
/*
Serve is a very simple static file server in go
Usage:
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
*/
package main
(source "melpa" "http://melpa.milkbox.net/packages/")
(source "gnu" "http://elpa.gnu.org/packages/")
(source "marmalade" "http://marmalade-repo.org/packages/")
(depends-on "ac-js2")
(depends-on "adaptive-wrap")
(depends-on "ag")
(depends-on "auto-complete")
(depends-on "calfw")
(depends-on "cask")