Skip to content

Instantly share code, notes, and snippets.

View ElijahLynn's full-sized avatar
😎
All Your DevOps Belong To Us

Elijah Lynn ElijahLynn

😎
All Your DevOps Belong To Us
View GitHub Profile

top (the UNIX process inspector) cheat sheet

This is a list of the most helpful keyboard commands I use within top.

The basics

h shows help on interactive commands. Also see the top manual page

q to quit the program.

function MYMODULE_template_preprocess_default_variables_alter(&$variables) {
$current_path = \Drupal::service('path.current')->getPath();
$variables['current_path'] = $current_path;
}

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@dragonken
dragonken / .vimrc
Last active April 11, 2024 13:27
YAML space indent for vim
syntax on
filetype plugin indent on
"Get the 2-space YAML as the default when hit carriage return after the colon
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
set is hlsearch ai ic scs
nnoremap <esc><esc> :nohls<cr>
"https://vim.fandom.com/wiki/Moving_lines_up_or_down
@frankcarey
frankcarey / drupal.wrapper
Created February 21, 2017 14:52
Drupal Wrapper for Ahoy+Docker+Drupal setup.
#!/usr/bin/env bash
#
# DRUSH WRAPPER
#
# A wrapper script which launches the Drush that is in your project's /vendor
# directory. Copy it to the root of your project and edit as desired.
# You may rename this script to 'drush', if doing so does not cause a conflict
# (e.g. with a folder __ROOT__/drush).
#
# Below are options which you might want to add. More info at
@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

@jchristi
jchristi / shared.py
Created May 24, 2017 20:24
Custom ansible dynamic inventory that allows a directory of variables to be shared across multiple inventories
#!/usr/bin/env python
import os
import six
import argparse
from six.moves import configparser
from ansible.parsing.dataloader import DataLoader
from ansible.inventory import Inventory
@klaaspieter
klaaspieter / ASS.md
Created June 22, 2017 07:59 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@rubenrivera
rubenrivera / GoTo.gs
Created May 2, 2018 02:58
Go To Macro. Shows a prompt on which the user set the address of cell to quickly jump into.
// Related Q&A https://webapps.stackexchange.com/q/116736/88163
function GoTo() {
var spreadsheet = SpreadsheetApp.getActive();
var Ui = SpreadsheetApp.getUi();
var buttons = Ui.ButtonSet.OK_CANCEL;
var response = Ui.prompt('Go to', 'Where do you want to go?', buttons);
if(response.getSelectedButton() === Ui.Button.OK){
var address = response.getResponseText();
spreadsheet.getRange(address).activateAsCurrentCell();
}