Skip to content

Instantly share code, notes, and snippets.

View scottfurry's full-sized avatar

Scott Furry scottfurry

View GitHub Profile
@grahamperrin
grahamperrin / freebsd-ports-git.md
Last active April 20, 2021 17:39
Beginning to use Git for FreeBSD ports: a rough guide

Beginning to use Git for FreeBSD ports: a rough guide

Not for committers.

Please treat this page as work in progress during the transition to Git.

Preparations

  1. rm /var/db/gitup/ports
  2. rm -r /usr/ports/*
@geekeren
geekeren / electron-floating-window.js
Last active March 10, 2022 11:34
electron Floating Window
let floatingWindow;
const createFloatingWindow = function() {
const electron = require('electron');
const BrowserWindow = electron.BrowserWindow;
if (!floatingWindow) {
floatingWindow = new BrowserWindow({
width: 1000,
height: 80,
titleBarStyle: 'hide',
transparent: true,
@mbinna
mbinna / effective_modern_cmake.md
Last active April 18, 2024 19:26
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@mendozao
mendozao / clamav-mac.md
Last active March 27, 2024 05:38 — forked from Uchean/clamav-mac.md
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd daemon, you'll need a copy of the ClamAV databases.

Inside /your/location/to/brew/etc/clamav, you'll see 2 files:

@Integralist
Integralist / Python ignore pylint flake8 errors.md
Last active October 31, 2022 14:19
[Python ignore pylint and flake8 linter errors] #tags: python, linter, ignore, pylint, flake8

Disable all linting across the entire file:

# pylint: disable-all (older)
# pylint: skip-file   (newer)
# flake8: noqa

Disable specific linting errors across the entire file:

@Fweeb
Fweeb / print-friendly.xml
Created July 23, 2015 09:59
"Print-Friendly" Blender theme used in Blender For Dummies, 3rd edition
<bpy>
<Theme>
<user_interface>
<ThemeUserInterface menu_shadow_fac="0.5"
menu_shadow_width="12"
icon_file=""
icon_alpha="1"
axis_x="#dc0000"
axis_y="#00dc00"
axis_z="#0000dc">
@lschmierer
lschmierer / dark_fusion.py
Last active October 17, 2023 19:02 — forked from QuantumCD/Qt 5 Dark Fusion Palette
Qt5 Dark Fusion Palette for Python
qApp.setStyle("Fusion")
dark_palette = QPalette()
dark_palette.setColor(QPalette.Window, QColor(53, 53, 53))
dark_palette.setColor(QPalette.WindowText, Qt.white)
dark_palette.setColor(QPalette.Base, QColor(25, 25, 25))
dark_palette.setColor(QPalette.AlternateBase, QColor(53, 53, 53))
dark_palette.setColor(QPalette.ToolTipBase, Qt.white)
dark_palette.setColor(QPalette.ToolTipText, Qt.white)
@asmaloney
asmaloney / Packaging_Example.sh
Last active September 14, 2023 14:45
This is an example of script to package up and create a DMG for a Mac OS X app. Details may be found here: http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
#!/bin/bash
# by Andy Maloney
# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
# make sure we are in the correct dir when we double-click a .command file
dir=${0%/*}
if [ -d "$dir" ]; then
cd "$dir"
fi
@brianloveswords
brianloveswords / git-obliterate
Last active January 24, 2024 12:28
git-obliterate: for removing sensitive files you may have committed from the entire history of the project.
#!/bin/bash
file=$1
test -z $file && echo "file required." 1>&2 && exit 1
git filter-branch -f --index-filter "git rm -r --cached $file --ignore-unmatch" --prune-empty --tag-name-filter cat -- --all
git ignore $file
git add .gitignore
git commit -m "Add $file to .gitignore"