Skip to content

Instantly share code, notes, and snippets.

View garyritchie's full-sized avatar

Gary Ritchie garyritchie

View GitHub Profile

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
@evertrol
evertrol / Makefiles.md
Last active February 23, 2025 11:34
Makefile cheat sheet

Makefile cheat sheet

Mostly geared towards GNU make

I've used ->| to indicate a tab character, as it's clearer to read than

  • Set a target, its dependencies and the commands to execute in order
target: [dependencies]
->| 
@hackerb9
hackerb9 / extract_cookies.sh
Last active November 19, 2024 06:45 — forked from spk/extract_cookies.sh
Extract cookies.sqlite to cookies.txt for use in wget or curl.
#!/bin/bash -e
# extract_cookies.sh:
#
# Convert from Firefox's cookies.sqlite format to Netscape cookies,
# which can then be used by wget and curl. (Why don't wget and curl
# just use libsqlite if it's installed?)
# USAGE:
#
# $ extract_cookies.sh > /tmp/cookies.txt
@angularsen
angularsen / .gitattributes
Last active January 6, 2020 12:31
Git dotfiles for Unity 3D
# Disable EOL conversions by default
* -text
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge
@ericleasemorgan
ericleasemorgan / natural language processing with shell
Last active August 26, 2024 15:24
some one-liners to extract urls, email address, and a dictionary from a text file
# extract all urls from a text file
cat file.txt | egrep -o 'https?://[^ ]+' | sed -e 's/https/http/g' | sed -e 's/\W+$//g' | sort | uniq -c | sort -bnr
# extraxt domains from URL's found in text files
cat file.txt | egrep -o 'https?://[^ ]+' | sed -e 's/https/http/g' | sed -e 's/\W+$//g' | sed -e 's/http:\/\///g' | sed -e 's/\/.*$//g' | sort | uniq -c | sort -bnr
# extract email addresses
cat file.txt | grep -i -o '[A-Z0-9._%+-]\+@[A-Z0-9.-]\+\.[A-Z]\{2,4\}' | sort | uniq -c | sort -bnr
# list all words in a text file
@justjanne
justjanne / Price Breakdown.md
Last active March 27, 2025 20:57 — forked from kylemanna/price.txt
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Permalink: git.io/vps

$5/mo

Provider Type RAM Cores Storage Transfer Network Price
@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active March 20, 2025 13:24
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@teocomi
teocomi / .gitignore
Created September 13, 2016 15:01
Gitignore for Unity projects
# =============== #
# Unity generated #
# =============== #
[Tt]emp/
[Oo]bj/
[Bb]uild
/[Bb]uilds/
/[Ll]ibrary/
sysinfo.txt
*.stackdump
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
@Ikalou
Ikalou / git_and_unity.md
Last active December 17, 2024 17:47
Git and Unity

EDIT: this is an old post and a lof the information in this document is outdated.

Using Git with Unity

Git logo

Git is a popular free and open source distributed version control system.

I am new to Unity, but as a long time git user, I wanted to use git for my