Skip to content

Instantly share code, notes, and snippets.

View soda92's full-sized avatar

Maple soda92

View GitHub Profile
@ammgws
ammgws / missing_ufw_samba.md
Last active January 26, 2025 19:59
Missing ufw samba application profile in /etc/ufw/applications.d

Am using a samba share on Ubuntu 16.04 server, and wanted to enable Samba traffic in ufw using sudo ufw allow from 192.168.8.0/24 to any app Samba comment 'allow samba from local' which returned the error "ERROR: Could not find a profile matching 'Samba'".

Cause: I was using the minimal amount of tooling required to use Samba (cifs-tools) on my server, which doesn't include the Samba application file.

Fix: install the samba package... or manually create the file:

sudoedit /etc/ufw/applications.d/samba

[Samba]
title=LanManager-like file and printer server for Unix
@santisbon
santisbon / Search my gists.md
Last active April 4, 2025 21:29
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active April 22, 2025 14:24
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@evantoli
evantoli / GitConfigHttpProxy.md
Last active April 22, 2025 04:32
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@Snegovikufa
Snegovikufa / mouseover.xaml
Created February 21, 2014 09:38
XAML mouse over button background
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="Green"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
@davidruhmann
davidruhmann / Base64.html
Last active December 18, 2024 02:33
[Javascript][HTML] Dynamically Change FavIcon with Base64 Image.
<!-- Green R0lGODlhEAAQAPewAFSeAFWfAFafAFegAFigAFmhAFqiAFuiAF2jAF+kAGClAGKmAGSnAGWoAGepAGqqAGurAHCuAHOwAHeyAHu0Bn62DIS5F4W6Goy+Jo/PEJHQFJLQF5TRGZXRHJbSH5vUHpLBMpTCNZjFPJvGPZ7IP5fSIJjTJJvUIJrUJ5zUIZ7VJZvUKp/WKJ3VLp7VL57VMJ/WMaDWK6HXLaXYKqPXMKDWNKDWNaHWNqHXN6LXOaPXO6TYNKXYNabZOKTYPaXYPqjaPaTLQqTMQ6vPRqbZQafZQ6vQR6rbQqjaRanaR6rbSqvbS63cUK7cUq/dVLLTSrTUS7jXTrvYT7LeU7LdVbHdWLHeWbPeXbTfX7bfXr7aUbXfYbbgUrfgXrjgX7fgZbjhYrrhZrnhaLvia7ziarzia73ibb3jbL3ibr7jbsLcU8PdVMjgV8ziWc3jWs7jWtDkW9HlXMDkdMHkdcHldcLld8LleMPlesPle8PmesXmfsbnfcbmf8bngcbogsfog8jng8nohsnoh8roh8rpicvoicvpi8zpjMzpjc3qkc7qkM/qk8/rk8/rlNHrltPrm9HsmdLsmdLsm9TtntTtn9btodbtotfupNfupdjup9nvqtrwrtzwr9zwsdzwst7xtN/xt+DyuuHyvOX0xOn2zer20Oz31O341+/42vD53fH54PL64vP64/P65PX76P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...