You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
🍐
pear
pearagit
🍐
i just need to remember that everything i want to do takes 30 to 300 times longer than i think it will and then plan accordingly
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac
Overview
This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.
Most the credit for these changes go to Dave Holland.
Simple guide for setting up OTG modes on the Raspberry Pi Zero
Raspberry Pi Zero OTG Mode
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int
Add custom DDNS provider for Namecheap on Synology NAS - ( The horrors )
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
Windows 10 automatically login and start a program.
Auto start a user program and hide windows 10 home from a user.
The goal is to setup a windows 10 home computer that automatically starts up and runs a user .exe program. No windows logos should be shown and the user should not be able to interact with other windows applications.
Upon shutdown of the .exe the computer should shutdown.
Regedit
Windows 10 home or pro doesn't allow you to directly set a classic windows app such as a user .exe program as the startup. We instead call a batch script that calls our .exe. instead.
A windows batch script is used to make a .exe run on startup.
HOWTO: Use WSL and its Git in a mixed development environment
How to setup a development environment where Git from WSL integrates with native Windows applications, using the Windows home folder as the WSL home and using Git from WSL for all tools.
Note if using Git for Windows, or any tool on the Windows side that does not use Git from WSL then there will likely be problems with file permissions if using those files from inside WSL.
Tools
These are the tools I use:
git (wsl) - Command line git from within WSL.
Fork (windows) - Git GUI (must be used with wslgit)
wslgit - Makes git from WSL available for Windows applications.
Important! Follow the installation instructions and do (at least) the first optional step and then the Usage in Fork instructions.
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 gist is just a compilation of the hard work that others have put in. I'm not a software developer, so if there are any mistakes or better ways of doing things, I'd appreciate any suggestions. Here's a list of the real heroes who made this possible:
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
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