Skip to content

Instantly share code, notes, and snippets.

View dMartinezAyuso's full-sized avatar

Diego M. Martínez Ayuso dMartinezAyuso

  • Sopra Group
  • Valencia (España)
View GitHub Profile
@mthenw
mthenw / README.md
Last active July 4, 2022 16:14
iTerm2 configuration
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public static class ListExtensions
{
public static T PickRandom<T>(this IList<T> source)
{
if (source.Count == 0)
return default(T);
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 10, 2025 23:11
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# aliases to change a git repo from private to public, and public to private using gh-cli
alias gitpublic="gh repo edit --accept-visibility-change-consequences --visibility public"
alias gitprivate="gh repo edit --accept-visibility-change-consequences --visibility private"
# delete all your repos using gh-cli (please do not run this unless you want to delete all your repos)
gh repo list --limit 300 --json url -q '.[].url' | xargs -n1 gh repo delete --yes
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 11, 2025 23:59
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname