By Qin Yu, last updated in Feb 2024. I hope this will save time for everyone.
For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):
-
List All System Images Available for Download:
sdkmanager --list | grep system-images
-
Download Image:
sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"
## Preamble | |
There are lots of tools out there that set power management, some more transparent (powertop), some less so (laptop-mode). Often it is hard to know what exactly the tool is doing to improvement power management. Here I would like to document some of the things I do to improve power efficiency and sometimes performance as well. | |
/etc/sysctl.d/99-sysctl.conf | |
> # To fix Dropbox not being able to handle too many files | |
> fs.inotify.max_user_watches = 524288 | |
> | |
> # VM writeback timeout (suggestion from powertop: In hundredths of a second, this is how often pdflush wakes up to write data to disk.) | |
> vm.dirty_writeback_centisecs = 1500 |
---- TidalCycles QUICK REFERENCE ---- | |
---------------------------------------------------------------- | |
-- To use in your editor after or alongside your code for quick reference | |
-- Work in progress, mostly to be used as basis for further documnentation work, sorry for the errors and omissions | |
-- designed with atom - monokai one dark vivid as theme | |
-- https://gist.github.com/mxactvtd/bf3fb357a419c7f063b98dfd9a66cf78 - check for update, I keep updating this quite often atm | |
---------------------------------------------------------------- | |
-- Some sources of Documentation -- | |
-- https://tidalcycles.org/patterns.html | |
-- https://tidalcycles.org/functions.html |
This a collection of notes and files used in my quest to create "Reboot to Windows" and "Reboot to Linux" scripts (and desktop shortcuts) for Linux and Windows respectively that automatically reboot my system and instruct rEFInd to auto-select the appropriate OS entry.
The key for achieving this is to modify the EFI Variable PreviousBoot
with GUID 36d08fa7-cf0b-42f5-8f14-68df73ed3740
, which rEFInd uses to store the last entry selected in the menu and, if using the +
default entry, will be used to select the default OS. By doing this, we trick rEFInd into booting the OS we choose without having to be physically there to press the keyboard.
Manual super: Alternative Design where subclass constructors do not automatically call superclass constructors
This Gist presents a new design of class-based object construction in ES6 that does not require use of the two-phase @@create protocol.
One of the characteristics of this proposal is that subclass constructors must explicitly super invoke their superclass's constructor if they wish to use the base class' object allocation and initialization logic.
An alternative version of this design automatically invokes the base constructor in most situations.
In Github, click on Fork. For example, if you go to https://github.com/timt/naive-http and click on Fork, I'll get my own copy on https://github.com/jcaraballo/naive-http
Clone your copy of the repo
$ git clone https://github.com/jcaraballo/naive-http
Now you have a master branch
$ git branch
- master
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
Often referred to as the "swiss army of knife" for TCP/IP networking, [Netcat][1] is an extremely versatile Linux utility that allows you to do anything under the sun using TCP/UDP sockets. It is one of the most favorite tools for system admins when they need to do networking related troubleshooting and experimentation.
In this tutorial, I am sharing a few useful netcat examples, although the sky is the limit when it comes to possible netcat
use cases. If you are using netcat
regularly, feel free to share your use case.
Note that when you are binding to well-known ports (0-1023) with nc
, you need root privilege. Otherwise, run nc
as a normal user.
$ nc -vn 192.168.233.208 5000