Skip to content

Instantly share code, notes, and snippets.

@micahscopes
micahscopes / batch_import_obj.py
Last active April 14, 2022 11:33
Batch import a folder of Wavefront OBJ files to Blender. It used to be that you could do this with the built-in OBJ import/export script, but I've been getting an error with that. Here's a workaround.
import os
import bpy
path_to_dir = "/directory/full/of/obj/files/"
files_in_dir = os.listdir(path_to_dir)
for file_in_dir in files_in_dir:
bpy.ops.import_scene.obj(filepath=path_to_dir+file_in_dir)
@justinatcamfil
justinatcamfil / play_stream
Last active May 5, 2023 08:17
stream linux audio from sound card through netcat
#!/bin/bash
# run on mac in terminal
while TRUE; do
nc <server_address> 15000 | play -q -t mp3 - || echo Attempting to connect...
sleep 1;
done
@MaxLaumeister
MaxLaumeister / Grub_Powerup.md
Last active June 7, 2024 15:58
Grub Init Tune: Mario Bros. Mushroom Powerup

Grub Init Tune - Mario Bros. Mushroom Powerup

This Grub Init Tune will make your computer sound like a Super Mushroom every time you turn it on! This only works for the Grub bootloader - this generally means you need to have Linux (or other Grub-based OS) installed.

Here's the code, which goes in your /etc/default/grub file:

GRUB_INIT_TUNE="1750 523 1 392 1 523 1 659 1 784 1 1047 1 784 1 415 1 523 1 622 1 831 1 622 1 831 1 1046 1 1244 1 1661 1 1244 1 466 1 587 1 698 1 932 1 1195 1 1397 1 1865 1 1397 1"

Installation Instructions

@linuxoid69
linuxoid69 / color
Last active February 6, 2024 16:56
man color gentoo
# красно-зеленая
export LESS_TERMCAP_mb=$'\033[01;31m'
export LESS_TERMCAP_md=$'\033[01;31m'
export LESS_TERMCAP_me=$'\033[0m'
export LESS_TERMCAP_se=$'\033[0m'
export LESS_TERMCAP_so=$'\033[01;44;33m'
export LESS_TERMCAP_ue=$'\033[0m'
export LESS_TERMCAP_us=$'\033[01;32m'
export LESS=-r
export GROFF_NO_SGR=1
# ~/.asoundrc or /etc/asound.conf
# ALSA configuration file
##### USAGE #####
# Save this file as "~/.asoundrc" (for user-specific sound configuration) or
# "/etc/asound.conf" (for system-wide sound configuration) and specify ALSA
# device names ad described in the next section.
##### DEVICE NAMES #####
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@nstarke
nstarke / release-android-debuggable.md
Last active June 26, 2024 15:20
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
@vemacs
vemacs / compton.conf
Last active May 8, 2023 16:57
Reasonable compton.conf (fixes shadows in the stock desktop environment) for Xubuntu 16.04
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
@LordH3lmchen
LordH3lmchen / termux-url-opener
Last active May 8, 2024 15:27
termux-url-opener
#!/data/data/com.termux/files/usr/bin/bash
#
# This is a termux-url-opener script to do diffrent tasks on my Android phone
#
#
#
# How to use this script
#############################
#
# Install git
@probonopd
probonopd / linux_fusion360.md
Last active May 21, 2024 07:40
Autodesk Fusion 360 on Linux

Autodesk Fusion 360 on Linux

In the Web Browser

Ubuntu, Fedora, openSUSE, CentOS, SUSE Linux Enterprise, Debian,... users can finally use Autodesk Fusion 360 in the Linux Browser now.

https://myhub.autodesk360.com

On Chromium 55.0.2843.0 I get NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED.