Skip to content

Instantly share code, notes, and snippets.

View toothbrush7777777's full-sized avatar

Toothbrush toothbrush7777777

View GitHub Profile
@Ravenstine
Ravenstine / vbscript_wine.md
Last active August 18, 2023 19:43
Installing VBScript in Wine (Linux)

How to Run VBScripts in Wine

It's very easy but not straight-forward or documented anywhere.

First, install Wine 1.6.2. This version probably isn't required, but it's the version that currently ships with Debian Jessie and it works with VBScript.

Install Winetricks and use it to add the following libraries:

  • wsh57
@rohityadavcloud
rohityadavcloud / my.cnf
Created July 27, 2015 10:19
Example MySQL my.cnf optimized
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
syslog
@mokoshalb
mokoshalb / imgtransfer.php
Created January 4, 2018 12:10
3 ways to download and save a remote image on your server using PHP
<?php
/*
In this tutorial I am going to show you some PHP Methods By which you can easily download remote server image on your local server.
Suppose you don't have FTP access of images but you are able to access images via http port and you want to perform bulk image download.
Then these methods are very useful and you can try any of them to download and save a remote images on your server folder.
*/
// Method-1: By using simple copy() function in PHP
copy("REMOTE SERVER IMAGE URL", 'LOCAL SERVER PATH');
// ie:
@huenisys
huenisys / Enable symbolic links for Git on Windows 10.md
Last active June 11, 2024 11:10
Enable symbolic links for Git on Windows 10
@andreiw
andreiw / _dma-for-every-acpi-dev.diff
Last active July 25, 2020 14:33
5.5 patch to support _DMA restrictions/translations for ACPI objects, to properly support xHCI with a 4GB Pi via ACPI
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 33f71983e..f7f7114c4 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -1076,12 +1076,13 @@ void iort_dma_setup(struct device *dev, u64 *dma_addr, u64 *dma_size)
else
size = 1ULL << 32;
- if (dev_is_pci(dev)) {
- ret = acpi_dma_get_range(dev, &dmaaddr, &offset, &size);
@Measter
Measter / abstraction_adventures.md
Created September 8, 2020 16:04
My Adventures in MMIO Abstraction

My Adventures in MMIO Abstraction

Some years ago, I came across a simple Roguelike on Reddit called coreRL. It's very simplistic; levels are just a box with two walls, only one enemy type with basic AI, no health or character attributes, and the only goal is to see how far you can get before you die. Having nothing better to do, I thought it'd be a fun little project to write a port for an Arduino Nano. The only inputs needed are the four movement keys, and the display can just be a basic SSD1306-driven 128x64 OLED panel.

I could, of course, do this in C++. The language is a known quantity for the ATmega328P that powers the Arduino Nano. The toolchain is mature, as are the abstractions for interacting with the onboard peripherals. There are also libraries