Skip to content

Instantly share code, notes, and snippets.

View Natetronn's full-sized avatar

Nathan Doyle Natetronn

View GitHub Profile
@Natetronn
Natetronn / custom.cfg
Last active November 21, 2021 18:11
Grub GPU Switcher
# copy the main menuentry from /boot/grub/grub.cfg and add it twice to /boot/grub/custom.cfg
# for Nvidia add the following to the end of the linux line: modprobe.blacklist=nouveau systemd.setenv=GPUMOD=nvidia rd.driver.blacklist=nouveau nouveau.modeset=0 nvidia.modeset=1
# for Nouveau add the following to the end of the linux line: modprobe.blacklist=nvidia systemd.setenv=GPUMOD=nouveau rd.driver.blacklist=nvidia nouveau.modeset=1 nvidia.modeset=0
# for example (again, adjust for your system based on your main menu entry)
menuentry 'Manjaro Linux - Nvidia' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-xxxxxxxx-xxxxxxx-xxxxxxx-xxxxx' {
savedefault
load_video
set gfxpayload=keep
@Natetronn
Natetronn / basic_ui_documented.py
Created October 15, 2021 22:31 — forked from AzureDVBB/basic_ui_documented.py
A commented template for making simple UI in blender using the bpy python API
#import the bpy module to access blender API
import bpy
#WARNING: this is written and tested for blender 2.79
#blender 2.8 and newer will likely have a different python API
#create a property group, this is REALLY needed so that operators
#AND the UI can access, display and expose it to the user to change
#in here we will have all properties(variables) that is neccessary
class CustomPropertyGroup(bpy.types.PropertyGroup):
@Natetronn
Natetronn / grub.cfg
Created October 19, 2020 20:51 — forked from Pysis868/grub.cfg
My own configuration file for GRUB2 to boot various live distributions of Linux-based operating systems, along with some system tools. I tried to include a lot of sample configuration entries, even if I don't currently use them, so it may help others. Exceedingly long blog post: http://tehfishyblog.logdown.com/chips/306146-a-homemade-ultimate-bo…
# Config for GNU GRand Unified Bootloader (GRUB) (2)
# /boot/grub/grub.cfg
# or
# /boot/grub2/grub.cfg
# This grub.cfg file was created by Lance http://www.pendrivelinux.com
# Suggested Entries and the suggestor, if available, will also be noted.
# and then improved by Pysis.
@Natetronn
Natetronn / pyproject.toml
Created July 3, 2020 20:03
poetry pyproject.toml
[tool.poetry]
name = "some name"
version = "0.1.0"
description = "some description"
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = "^3.7"
pyqt5 = "5.15.0"
# Maintainer: Zach Hoffman <zach@zrhoffman.net>
pkgname=docksal
pkgver=1.13.1
pkgrel=1
epoch=1
pkgdesc='All-purpose web-development environment based on Docker and Docker Compose.'
arch=('any')
url='https://docksal.io/'
license=('MIT')
@Natetronn
Natetronn / safecracker-garbage-collection.md
Last active April 15, 2019 19:01
Safecracker Garbage Collection

Ever run into this error before?

Uncaught TypeError: Object [object Object] has no method 'markItUp'

If you've ever used Safecracker for ExpressionEngine chances are you have!

What's happening is Safecracker is including JavaScript for custom fields in your form for you. These custom fields rely on said js to function properly. This in itself isn't a big deal but, the issue arises because Safecracker spits out this js right smack in the middle of your template wherever your Safecracker form happens to be located.

Again not the biggest issue except:

@Natetronn
Natetronn / .editorconfig
Created April 16, 2015 23:15
Craft CMS Editor Config with PT Coding Standards - Find your IDE/Editor here: http://editorconfig.org/#download
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@Natetronn
Natetronn / ee-edit-link.html
Last active January 4, 2016 21:19
Edit Entry - ExpressionEngine

Templating in EE vs. Craft

Lots of people have asked, so here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft.

Table of Contents

  1. Comments
  2. Conditionals
  3. Loops
@Natetronn
Natetronn / sha1-passwords.php
Created August 9, 2013 19:05
Generate SHA1 hashes for passwords (don't leave this lying around on your live server of course!)
<?php
$passwords = array(
'somepassword',
'anotherpassword',
'onemorepassword'
// so on and so forth (don't forget the trailing commas)
);
// convert passwords to SHA1 hashes