Skip to content

Instantly share code, notes, and snippets.

View fabianmossberg's full-sized avatar
🏡
Hello world!

Fabian Mossberg fabianmossberg

🏡
Hello world!
View GitHub Profile
@elipapa
elipapa / _Setup_new_laptop.md
Last active February 26, 2024 04:27
Steps to set up a new osx laptop for data science and computational biology work

Set up a new os x laptop

Steps to setup a new OS X laptop with a data science & computational biology development environment.

Last updated: 7 Jan 2017 macOS: Yosemite => Sierra

Sure you could try to do this from dotfiles, but historically something has broken and required manual input anyway. So, inspired by the pragmatism of paul irish bash setup script and a few other gists written in markdown like this, I rolled my own.

Some design considerations:

@mrakowski
mrakowski / git-log-examples.txt
Last active October 19, 2021 08:51
git log examples
// Show a list of previous commits
git log
git log --oneline --since=1.days
git log --no-merges
git log --since=1.days
git log --pretty=format:"%s" --no-merges -n 25
git log --pretty=format:"%s" --no-merges --since=1.days
git log --pretty=format:"%s" --no-merges --since=18.hours
@runspired
runspired / .bash_profile
Last active February 6, 2023 14:56
Make Alfred / Spotlight ignore node_modules and bower_components
alias nom='npm cache clean && rm -rf node_modules && mkdir node_modules && touch node_modules/.metadata_never_index && npm install'
alias bom='bower cache clean && rm -rf bower_components && mkdir bower_components && touch bower_components/.metadata_never_index && bower install'
@deweller
deweller / remote-tmux.conf
Created June 13, 2016 15:16
My remote tmux config
# for remote servers
unbind C-b
# use C-a for prefix
set-option -g prefix C-a
# change delay
set -sg escape-time 1
@adajw
adajw / 00-main.sh
Last active September 16, 2021 08:14
Arch Linux
# script order:
# install.sh
# configure.sh
# harden.sh
# iptables.sh
# grub.sh
# TODO security:
# - grsec configure
# - sudo & root hardening
@acamino
acamino / README.md
Last active July 18, 2025 03:28
Shortcuts to Improve Your Bash & Zsh Productivity

Shortcut — Action

  • CTRL + A — Move to the beginning of the line
  • CTRL + E — Move to the end of the line
  • CTRL + [left arrow] — Move one word backward (on some systems this is ALT + B)
  • CTRL + [right arrow] — Move one word forward (on some systems this is ALT + F)
  • CTRL + U — (bash) Clear the characters on the line before the current cursor position
  • CTRL + U —(zsh) If you're using the zsh, this will clear the entire line
  • CTRL + K — Clear the characters on the line after the current cursor position
  • ESC + [backspace] — Delete the word in front of the cursor
@blvz
blvz / gh-deploy-clone.sh
Last active June 3, 2025 05:00
Creates a deploy key and clones the repository.
#!/usr/bin/env bash
read -r -d '' usage << EOM
Usage:
gh-deploy-clone user/repo [ENVIRONMENT]
EOM
[ -z "$1" ] && echo && echo "$usage" && echo && exit 1
@mrhahn3000
mrhahn3000 / caching.conf
Last active January 26, 2021 16:40
This is a very good configuration for Ghost Blog behind an ngnix web server hosted on a Raspberry Pi. All settings regarding security, secrecy and performance :) Using Let's encrypt as certificate provider.
##
# Caching
##
# sets the proxy cache path location, max size 2g
proxy_cache_path /var/cache/nginx/ levels=1:2 keys_zone=blog_cache:10m max_size=2g inactive=120m;
# add a cache HIT/MISS header
add_header X-Proxy-Cache $upstream_cache_status;
@maddisondesigns
maddisondesigns / functions.php
Last active August 5, 2025 09:32
WooCommerce Custom Fields for Simple & Variable Products
/*
* Add our Custom Fields to simple products
*/
function mytheme_woo_add_custom_fields() {
global $woocommerce, $post;
echo '<div class="options_group">';
// Text Field
@pmkay
pmkay / top-brew-packages.txt
Last active August 12, 2025 15:55 — forked from r5v9/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles