Skip to content

Instantly share code, notes, and snippets.

@KunYi
KunYi / setup Yocto for NXP i.MX8 build env on Ubuntu 18.04.txt
Last active July 19, 2022 11:46
setup Yocto/NXP i.MX8 build environment on Ubuntu 18.04
# prepare common tools
sudo apt update
sudo apt upgrade
sudo apt install git gitk build-essential vim curl wget software-properties-common apt-transport-https ca-certificates
# add visual studio code repository
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
# add docker repository
@yorikvanhavre
yorikvanhavre / io_import_fcstd.py
Last active July 17, 2023 20:43
Blender FreeCAD importer stub
# ##### 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
@roman-yepishev
roman-yepishev / dell-os-recovery-linux-mini-howto.md
Last active December 1, 2024 00:05
Dell OS Recovery Tool under Linux Mini-HOWTO

Dell OS Recovery Tool Under Linux Mini-HOWTO

Since I was unable to find a specific answer to how can one create a Dell recovery disk from within Linux, I decided to write the steps here.

If you write the CD image directly to the USB drive (or create a new partition and write it there), the laptop will not boot. You need your USB media to be in FAT32 format with the contents of the recovery ISO.

  1. Download the recovery ISO from the support section of Dell website.
  2. Insert a USB Drive with enough capacity to hold the contents of the ISO image.
  3. Format the drive and create a filesystem where $USB_DEVICE is your USB drive (check with fdisk -l, it may be
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active December 4, 2024 17:04
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@mario52a
mario52a / Macro_FCSpring_Helix_Variable.FCMacro
Last active July 11, 2024 19:05
This macro creates a spring with customizable, any turn may change the spring configuration can be saved in a file with the extension .FCSpring or in a coordonate file with the extension .FCSpringCoor
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import division
"""
***************************************************************************
* Copyright (c) <mario52> 2014-2015-2016-2017 2018 2019 2020 2022 2023 *
* 2024 *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
@sbisbee
sbisbee / transmission-remote-magnet.bash
Last active October 3, 2022 18:29
Quick and easy way of making Chrome send bittorrent magnet links to a remote Transmission instance using its API on Ubuntu with xdg.

Quick and easy way of making Chrome send bittorrent magnet links to a remote Transmission instance using its API on Ubuntu with xdg. This method does not require modifying any system files or xdg's scripts, whereas most of the examples I found on the Internet did require such hacks.

Chrome does not handle default applications, instead relying on the OS to manage that. The default handler in Ubuntu is xdg, which maps the MIME type to the default application. Extra tooling is required because xdg requires a registered desktop file, so you can't simply give it a command to run.

Steps:

  1. Install the shell script transmission-remote-magnet ideally in /usr/local/bin: ln -s ~/src/transmission-remote-magnet.bash transmission-remote-magnet

  2. Install the desktop file, which is required for xdg to work and will likely require sudo: desktop-file-install ./transmission-remote-magnet.desktop