Skip to content

Instantly share code, notes, and snippets.

@elijahr
elijahr / example.yml
Last active December 6, 2020 03:37
Interpolates aliases in YAML
_anchors:
checkout_repo: &checkout_repo
name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: recursive
install_pip_requirements: &install_pip_requirements
@backtrader
backtrader / ibtutorial.py
Last active May 9, 2024 03:06
Interactive Brokers in Python with backtrader
#!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2018 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@romainl
romainl / redir.md
Last active July 9, 2024 16:26
Redirect the output of a Vim or external command into a scratch buffer

Redirect the output of a Vim or external command into a scratch buffer

Usage (any shell)

Show full output of command :hi in scratch window:

:Redir hi

Show full output of command :!ls -al in scratch window:

@thiagoh
thiagoh / watchfiles.md
Last active June 8, 2023 15:56
watchfiles: Watch multiple files and execute bash commands as file changes occur

watchfiles

  • author: Thiago Andrade thiagoh@gmail.com
  • license: GPLv3
  • description:
  • watches the given paths for changes
  • and executes a given command when changes occur
  • usage:
  • watchfiles <paths...>
@gorango
gorango / screencast.md
Last active January 7, 2023 04:28
Uses CVLC (command-line VLC) to record a screen session in Linux.

Linux screen capture

Uses CVLC (command-line VLC) to record an ongoing screen session in Linux.

Requires VLC to be installed.

Usage

To save a new video file in the current folder:

@hraban
hraban / .bash_aliases
Last active June 12, 2018 22:37
bash aliases
#!/bin/bash
#### GIT STUFF
# gitlog only the specified revision(s), e.g. $ gitlog1 master some-feature-branch
alias gitlog1='git log --color --graph --format="format:%C(normal bold)%h%Creset %s%C(red)%d%Creset (%C(yellow)%aN%Creset, %C(green)%ar%Creset)"'
# Entire git commit history with tree and colors and branch names
alias gitlog='gitlog1 --all --branches=\* --remotes=\*'
@hraban
hraban / pre-commit.md
Last active April 18, 2024 06:46
Prevent accidentally committing debug code in Git
@gubatron
gubatron / compiling_building_c_cpp_notes.md
Last active April 18, 2024 07:58
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015;

Last update on December 14, 2023

Updated on February 27, 2023

Updated August 29, 2019.

@basilfx
basilfx / tmux-notify.pl
Last active November 29, 2021 11:01
Irssi and tmux-notify
use strict;
use warnings;
use vars qw($VERSION %IRSSI);
use Irssi;
# Script info
$VERSION = '0.1';
%IRSSI = (
authors => 'Bas Stottelaar',
@magnusbae
magnusbae / git-stop-tracking-remote-branch.md
Created April 8, 2014 20:05
How to make Git stop track a remote branch without deleting the remote branch.

You don't have to delete your local branch.

Simply delete your remote tracking branch:

git branch -d -r origin/<remote branch name> (This will not delete the branch on the remote repo!)

See "Having a hard time understanding git-fetch"

there's no such concept of local tracking branches, only remote tracking branches.