Skip to content

Instantly share code, notes, and snippets.

View emads3's full-sized avatar
🎯
Focusing

emad emads3

🎯
Focusing
  • Dubai
View GitHub Profile
@itsmikita
itsmikita / README.md
Last active May 7, 2024 05:30
Create bootable USB drive from InstallMacOSX.pkg

Create bootable USB drive from InstallMacOSX.pkg

  1. Erase USB drive with Disk Utility using format Mac OS Extended (Journaled) and Master Boot Record and call it MyVolume
  2. Use Finder to mount/open InstallMacOSX.dmg.
  3. Run following commands:
pkgutil --expand /Volumes/Install\ OS\ X/InstallMacOSX.pkg /tmp/El\ Capitan
diskutil eject Install\ OS\ X
cd /tmp/El\ Capitan
@jdgregson
jdgregson / Call-MMI-code-from-iOS-shortcut.md
Last active September 15, 2023 06:03
Call MMI code from iOS Shortcut - MMI or SSD is not supported

When trying to create an iOS Shortcut which calls an MMI code, such as the forwarding interrogation code *#21#, you may find that Shortcuts refuses to place the call and shows the error message MMI or SSD is not supported.

You can work around this in some circumstances by opening a tel: URL to the MMI code. To do so:

  1. Create an action to "Open URLs"
  2. For the URL, enter tel: followed by the MMI code you want to dial, replacing * (asterisk) with %2a and # (pound sign) with %23

To dial *#21#, your shortcut action would say the following:

Open tel:%2a%2321%23

@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on
@liaohuqiu
liaohuqiu / gist:4ee77b9b03afcdecc80252252378d367
Created June 9, 2016 00:38
Find out the full duration time of a YouTube playlist
var list = document.getElementsByClassName('pl-video-time');
var time = 0;
function toS(hms) {
var a = hms.split(':');
while (a.length < 3) {
a.unshift(0);
}
var seconds = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]);
return seconds;
@erdem
erdem / countries.json
Last active August 30, 2023 11:08
Country list as JSON format. fields: name, coordinates, timezones, country code and capital resource: https://github.com/mledoze/countries
[
{
"timezones": [
"America/Aruba"
],
"latlng": [
12.5,
-69.96666666
],
"name": "Aruba",