Skip to content

Instantly share code, notes, and snippets.

@netjoon
netjoon / Browser.pjson
Last active May 1, 2024 20:39
Browser
{"name":"mainLoop","projectname":"Browser","objectlist":[{"class":"ImageButton","resource-id":"softkey%253A%252Fcalltest","codegen":"","varname":"callTest_1","objecttable-uuid":"1633f19c-b6c2-4c3b-c1e0-40644a7155c4","action":"codegen","uititle":"ImageButton%250Asoftkey%253A%252Fcalltest","uinameinfo":"%253Csoftkey%253A%252Fcalltest%253E","actiontype":"script","calltestloop":"1","calltest":"startTest","loadfromsavedobject":true}],"objectindex":0}
@mtbfuiengine2
mtbfuiengine2 / Browser_05_01_04_01.json
Last active May 1, 2024 20:39
Hplus_ATT_Call_Browser_Test
{"name":"Browser_05_01_04_01","objectlist":[{"class":"ImageButton","resource-id":"softkey%3A%2Fscriptaction","codegen":"logStartTest(%22Browser_05_01_04_01%22)","varname":"scriptAction_2","objecttable-uuid":"cacb6879-6171-492d-d041-99bbf64e28c2","action":"click","uititle":"ImageButton%0Asoftkey%3A%2Fscriptaction","uinameinfo":"%3Csoftkey%3A%2Fscriptaction%3E","actiontype":"script","randomexec":"100","waittime":"0s","loadfromsavedobject":true},{"class":"ImageButton","resource-id":"softkey%3A%2Fgotoapp","codegen":"","varname":"gotoApp_2","objecttable-uuid":"ec8c2cb5-005c-4189-c656-6b608778077e","action":"codegen","uititle":"ImageButton%0Asoftkey%3A%2Fgotoapp","uinameinfo":"%3Csoftkey%3A%2Fgotoapp%3E","actiontype":"script","randomexec":"100","waittime":"0s","inputtext":"Chrome","loadfromsavedobject":true},{"parentid":9223372032559809000,"sourcenodeid":9223372032559809000,"windowid":320,"index":2,"classname":"Button","class":"Button","text":"Accept%20%20continue","parentpathid":-119906854,"objectid":-731197748,"s
@Darkhogg
Darkhogg / !RebootToOs.md
Last active May 1, 2024 20:38
"Reboot to {OS}" scripts for rEFInd Next Boot selection

Reboot to {OS}

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.

General Information

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.

@ptvans
ptvans / _.md
Created August 9, 2014 08:11
flying-fuck
@ThioJoe
ThioJoe / DisableUSBPowerManagement.ps1
Last active May 1, 2024 20:38
PowerShell script to disable Windows power management on all currently connected serial ports, including most (if not all) USB devices and adapters.
# PowerShell script to disable Windows power management on all currently connected serial ports, including USB adapters
# In simpler terms, it prevents Windows from turning off connected serial devices to save power.
# Equivalent to right-clicking on a serial port device in Device Manager > Properties > "Power Management" Tab > Unchecking "Allow the computer to turn off this device to save power."
$hubs = Get-CimInstance -ClassName Win32_SerialPort | Select-Object Name, DeviceID, Description
$powerMgmt = Get-CimInstance -ClassName MSPower_DeviceEnable -Namespace root\wmi
foreach ($p in $powerMgmt) {
$IN = $p.InstanceName.ToUpper()
foreach ($h in $hubs) {
@pasupulaphani
pasupulaphani / after_res_hooks.js
Last active May 1, 2024 20:37
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups
@amakukha
amakukha / Play2Tones.ino
Last active May 1, 2024 20:36
Play duo melody with Arduino
/*
* Play duo melody with Arduino
* ============================
*
* Description:
* This sketch simultaneously plays two separate melodies on two (passive)
* speakers or buzzers. This creates effect of a "choir".
* For simplicity, it uses function play2Tones(), which only plays two notes
* of equal duration simultaneosly.
* The actual melody here is the Anthem of Ukraine.
@Skylarkroam
Skylarkroam / background.js
Created March 11, 2019 18:57
Vivid Browser
//added to git
// chrome.windows.getAll({}, function (winArr) {
// // print(winArr)
// for (var win of winArr) {
// SinWave(win);
// }
// });
// function SinWave(win) {
@deenie1
deenie1 / build.gradle.kts
Created May 1, 2024 20:34 — forked from marcellogalhardo/build.gradle.kts
Root gradle.build.kts global settings for KAPT
allprojects {
afterEvaluate {
// Global KAPT flags applied to all projects.
extensions.findByType<KaptExtension>()?.apply {
// Do not replace unknown types (including types for the generated classes) by NonExistentClass.
correctErrorTypes = true
// Provide links to locations in the original Kotlin code rather than generated Java stubs
// as it reports errors encountered during annotation processing.
@weirdoonthebus
weirdoonthebus / index.html
Created December 10, 2016 21:09
Right Now
<!--
photo background by marcelo quinan via unsplash: https://unsplash.com/marceloquinan -->
<header id="header"><h1>Right Now</h1><form><input id="search" type="text"placeholder="Search or say 'Ok Google'"></form></header>
<article>
<section id="section"></section>
<section></section>
<section></section>
<section></section>
<section></section>
</article>