Skip to content

Instantly share code, notes, and snippets.

🍔
Eating

Adam Bull adaam2

🍔
Eating
Block or report user

Report or block adaam2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .zshrc
#
# Executes commands at the start of an interactive session.
#
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
COMPLETION_WAITING_DOTS="true"
View .tmux.conf
set -g default-terminal "screen-256color"
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
View .vimrc
" Modeline and Notes {{{
" DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
" Version 2, December 2004
"
" Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
"
" Everyone is permitted to copy and distribute verbatim or modified
" copies of this license document, and changing it is allowed as long
" as the name is changed.
"
View .aliases
# Docker
alias dc="docker-compose"
# Aliases to code folders
alias cde="cd ~/Code"
alias fees="cd ~/Code/consumer-fees"
# Golang
# alias go="richgo"
View alacritty.yml
shell:
program: /bin/zsh
args:
- -l
- -c
- "tmux ls && read tmux_session && tmux attach -t ${tmux_session:-default} || tmux new -s ${tmux_session:-default}"
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
View codingtest.js
const courses = {
starters: ["🍔", "🍐", "🍅"],
mains: ["🍏", "🍊"],
desserts: ["🍰", "🍓"]
};
const dishesChefCanMake = ["🍏", "🍅", "🍐", "🍔"];
// for each of the courses, find the dishes that the chef can make
// and print them out like so:
View database_cleaner.rb
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each, js: true) do
View Example.cs
public interface IRepository<T> where T : class
{
T Find(int id);
List<T> All();
void Delete(int id);
void Update(T obj);
}
public class ProductRepository : IRepository<Product>
{
@adaam2
adaam2 / IRepository.cs
Last active Jul 23, 2018
Basic IRepository
View IRepository.cs
public interface IRepository<T> where T : class
{
T Find(int id);
List<T> All();
void Delete(int id);
void Update(T obj);
}
You can’t perform that action at this time.