Skip to content

Instantly share code, notes, and snippets.

View ElusiveByte's full-sized avatar

Angel Martin ElusiveByte

View GitHub Profile
@leahcim
leahcim / 25_pre-os-prober
Created March 3, 2014 19:13
In Ubuntu, /etc/grub.d/30_os-prober overrides grub menu style and timeout defined by the user in /etc/default/grub. Here is a workaround to save the menu style and timeout values before os-prober changes them, and to restore them afterwards. The two files need to be placed under /etc/grub.d and made executable. Finally, "sudo update-grub" should…
#! /bin/sh
set -e
# Save the $timeout and $timeout_style values set by /etc/grub.d/00_header
# before /etc/grub.d/30_os-prober messes them up.
cat << EOF
set timeout_bak=\${timeout}
set timeout_style_bak=\${timeout_style}
EOF
@dmhendricks
dmhendricks / bind-queryselector-to-dollar-sign.js
Last active May 16, 2024 12:17
Bind querySelector to dollar sign ($) to reference DOM elements without jQuery
/**
* Bind querySelector to dollar sign ($) to easily reference DOM elements without jQuery
* Source: https://twitter.com/MrAhmadAwais/status/1113094169025708033
*/
// In case you're also loading jQuery
jQuery.noConflict();
// Example - Change an element's background color
// Shorthand for: document.querySelector( '.selector' ).style.background = '#BADA55';
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 17, 2024 09:42
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites