Rebase to squash pushed commits into single commit before merge.
- Print a pretty log to deteremine number of commits
git log --pretty=format:"%h %s" HEAD~11..HEAD
- Rebase to squash commits together in editor
git rebase -i HEAD~11
import {readFileSync} from "fs"; | |
const plays = JSON.parse(readFileSync("../shared/plays.json")); | |
const invoices = JSON.parse(readFileSync("../shared/invoices.json")); | |
function statement(invoice, plays) {e | |
let totalAmount = 0; | |
let volumeCredits = 0; | |
let result = `Statement for ${ | |
invoice.customer | |
}\n`; |
# --- GET tmux | |
# 1. $: brew install tmux | |
# 2. $: tmux | |
# 3. $: touch ~/.tmux.conf | |
# 4. $: tmux source-file ~/.tmux.conf # <- to attach config to that new file | |
# 5. Copy everything below and paste into the ~/.tmux.conf file | |
# --- .tmux.conf content: | |
# Config file for tmux shortcuts. |
Rebase to squash pushed commits into single commit before merge.
git log --pretty=format:"%h %s" HEAD~11..HEAD
git rebase -i HEAD~11
Easy way to let cron to open + join to the re-occuring meeting for you.
Create a new file in you fave code editor. Insert following
#!/bin/bash
open zoommtg://zoom.us/j/12312312312?pwd=aBaBABABaBAbAmb1abAbABBB1ABAbAb12
Change the zoom id (12312312312
) and password (aBaBABABaBAbAmb1abAbABBB1ABAbAb12
) to your meeting.
... other bash stuff | |
# --------------- | |
# Change bash prompt | |
# 1. find PS1 from file (line 60 or so) | |
# 2. swap it to just show current directory and $ | |
PS1='\[\033[01;32m\]\W\[\033[00m\]\$ ' # for green text | |
PS1='\[\033[01;34m\]\W\[\033[00m\]\$ ' # for blue text | |
# --------------- |
# Example of double list comprehension in python | |
# example key = some_numbers-some_more_numbers-message_id | |
found_keys = [key for message_id in all_messageids for key in returned_keys if key.endswith(message_id)] | |
print(found_keys) | |
# Following results in same but in the long way | |
found_keys = [] | |
for key in returned_keys: | |
for message_id in all_messageids: |
# --- GET tmux (mac) | |
# 1. $: brew install tmux | |
# 2. $: tmux | |
# 3. $: touch ~/.tmux.conf | |
# 4. $: tmux source-file ~/.tmux.conf # <- to attach config to that new file | |
# 5. Copy everything below and paste into the ~/.tmux.conf file | |
# --- .tmux.conf content: | |
# Config file for tmux shortcuts. |
# Put the following into your ~/.bash_profile file (Mac) or ~/.bashrc file (Ubuntu) | |
# Enables to use shortcuts for most common git commands. | |
# ---------------------- | |
# Git Aliases | |
# ---------------------- | |
alias gf='git status' | |
alias gb='git branch' | |
alias gbn='git checkout' | |
alias gbnb='git checkout -b' |
<?php | |
function use_parent_theme_stylesheet() { | |
// Use the parent theme's stylesheet | |
return get_template_directory_uri() . '/style.css'; | |
} | |
function my_theme_styles() { | |
$themeVersion = wp_get_theme()->get('Version'); | |
// Enqueue our style.css with our own version |
// whole nr either 0,1,or 2 | |
Math.floor((Math.random() * (3-0))); | |
// whole nr either 1,2 or 3 | |
Math.floor((Math.random() * (3-0) + 1)); |