Skip to content

Instantly share code, notes, and snippets.

@vladucu
vladucu / GPG and git on macOS.md
Created February 25, 2022 09:05 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
### Keybase proof
I hereby claim:
* I am vladucu on github.
* I am vladucu (https://keybase.io/vladucu) on keybase.
* I have a public key ASD8gomVtx9hjp9Uy_aI3ourn_xuXFsN2BlGYiQY8SkVMwo
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am vladucu on github.
* I am vladucu (https://keybase.io/vladucu) on keybase.
* I have a public key ASD8gomVtx9hjp9Uy_aI3ourn_xuXFsN2BlGYiQY8SkVMwo
To claim this, I am signing this object:

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
############################
# Basic usage
############################
cd path/to/project
# One file type:
# Replace "red rover" with "black dog" in PHP files
delimiter ;;
drop procedure if exists build_catalog;;
create procedure build_catalog(IN categories INT, IN products INT)
begin
SET @category_count = 1;
SET @CATNAMEPREFIX = "Category ";
SET @CATURLKEYPREFIX = "cat-";
SET @CATURLPATHPREFIX = "catpath-";
SET @ROOTCATEGORY = 2;
SET @INCLUDEINMENU = 1;
@vladucu
vladucu / mage_script.php
Created January 21, 2014 20:09
Copies a column's value to other columns in same table ('sales_flat_order_item'), but only for the order items that are associated with a completed order.
<?php
require_once 'app/Mage.php';
Mage::app();
$resource = Mage::getSingleton('core/resource');
$adapter = $resource->getConnection('core_read');
// Get all order ids with a status of complete
$completeOrders = $adapter->select()
->from(array('order' => $resource->getTableName('sales/order')),
array(
@vladucu
vladucu / gist:6104018
Last active December 20, 2015 08:59
Sublime cheatsheet

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after