Note
Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
Important
Crucial information necessary for users to succeed.
[!WARNING]
Note
Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
Important
Crucial information necessary for users to succeed.
[!WARNING]
const { execSync } = require('child_process') | |
const { createHash } = require('crypto') | |
const invertColor = require('invert-color') | |
const branchName = execSync('git rev-parse --abbrev-ref HEAD') | |
const hash = createHash('sha256') | |
hash.update(branchName) | |
const color = '#' + hash.digest().toString('hex').substring(0, 6) | |
const invertedColor = invertColor(color, true) |
<?php | |
/** | |
* //JT 13.12.19: create_function() is deprecated. | |
*/ | |
include 'tabs.php'; | |
class Tabify_Edit_Screen_Edit_Screen { |
REMOTE=origin | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
BATCH_SIZE=10 | |
# check if the branch exists on the remote | |
# if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then | |
# # if so, only push the commits that are not on the remote already | |
# range=$REMOTE/$BRANCH..HEAD | |
# else | |
# # else push all the commits |
function squarify (children, row, width) { | |
if (children.length === 1) { | |
layoutLastRow(row, children, width) | |
return | |
} | |
const rowWithChild = [...row, children[0]] | |
if (row.length === 0 || worst(row, width) >= worst(rowWithChild, width)) { |
procedure squarify(list of real children, list of real row,real w) | |
begin | |
real c = head(children); | |
if worst(row, w) ≤ worst(row++[c], w) then | |
squarify(tail(children), row++[c], w) | |
else | |
layoutrow(row); | |
squarify(children, [], width()); | |
fi | |
end |
#!/bin/sh | |
git filter-branch --env-filter ' | |
OLD_EMAIL="mail@ayoayco.com" | |
CORRECT_NAME="Ayo" | |
CORRECT_EMAIL="ramon.aycojr@gmail.com" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" |
-- run first thing in the morning, e.g., from cron | |
tell application "Things3" | |
set theToken to "your-auth-token" | |
set theTodos to to dos of list "Today" | |
repeat with aTodo in theTodos | |
set tagList to tags of aTodo | |
repeat with aTag in tagList | |
if (name of aTag as text) is "Evening" |
version: '3' | |
services: | |
app: | |
image: nginx:alpine | |
ports: ["80:80"] | |
restart: unless-stopped | |
restarter: | |
image: docker:cli | |
volumes: ["/var/run/docker.sock:/var/run/docker.sock"] |
Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.