This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayAnimationOnKey : MonoBehaviour | |
{ | |
public Animation animationToPlay; | |
// Start is called before the first frame update | |
void Start() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayerMovementController : MonoBehaviour | |
{ | |
public CharacterController characterController; | |
public Camera playerCamera; | |
private Vector3 playerVelocity; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script automates the process of exporting the .glb file. | |
You can run this script from the command-line in a headless mode. | |
Example usages: | |
```sh | |
blender -b -P export_gltf.py mymodel.blend | |
/Applications/Blender.app/Contents/MacOS/Blender -b -P export_gltf.py "Monkey.blend" | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove a prefix from all files in recursive subdirs | |
import os | |
PREFIX_TO_REMOVE = "Something - " | |
ROOT_DIR = "." | |
for (dirpath, dirs, files) in os.walk(ROOT_DIR): | |
for filename in files: | |
# print(f'{filename} {dirpath} {dirs}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the `code.py` for CircuitPy | |
""" | |
G9 = 127 | |
"A4" = 69 | |
C4 = 60 | |
C0 = 12 | |
""" | |
from adafruit_macropad import MacroPad | |
# C minor pentatonic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import random | |
# Reference: https://www.youtube.com/watch?v=r8hqLh_HE08 | |
# After running the script, go to the Animation tab and hit SPACE to run the animation | |
def delete_all_cubes(): | |
# Select all cubes by name | |
for o in bpy.context.scene.objects: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'net/http' | |
BACKUP_DESTINATION_DIR = '/home/nanodano/mc_backup_rotate/backup_test' | |
DISCORD_WEBHOOK_URL = '' | |
DIR_TO_BACKUP = '/home/nanodano' | |
DB_USER = 'username' | |
DB_HOST = '127.0.0.1' | |
DB_NAME = 'dbname' | |
DB_PASS = 'password' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Extract images from a PDF | |
Modified from original at https://www.geeksforgeeks.org/how-to-extract-images-from-pdf-in-python/ | |
pip install fitz frontend pymupdf | |
""" | |
import fitz | |
import io | |
from PIL import Image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Healthy Reminders | |
# | |
# Setup a cron job to remind you to do healthy things | |
# Install dependency with: `sudo apt install libnotify-bin` | |
# | |
# Usage: remind.sh "Time to hydrate." | |
# | |
# Some cron examples (`crontab -e`): | |
# 0 * * * * /home/dano/Healthy-Reminders/remind.sh "Time to stand up." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copy your SSH public key into a remote | |
host's `~/.ssh/authorized_keys` file. | |
pip install paramiko | |
Usage: ssh-copy-id.py <host> <username> | |
""" | |
from paramiko import SSHClient, AutoAddPolicy | |
import sys |
NewerOlder