Skip to content

Instantly share code, notes, and snippets.

View 9072997's full-sized avatar

Jon Penn 9072997

  • Fayetteville, AR
View GitHub Profile
@straker
straker / README.md
Last active February 7, 2024 11:59
Basic Breakout HTML and JavaScript Game

Basic Breakout HTML and JavaScript Game

This is a basic implementation of the Atari Breakout game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Lives
  • The player should have 3 chances to remove all the bricks. Display how many lives the player currently has using context.fillText(). Remove a life when the ball goes below the screen
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 16, 2024 08:43
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@ewauq
ewauq / logitech-bind-f13-f24.lua
Last active November 29, 2023 06:23
How to: Bind F13 to F24 keys on the G-keys (Logitech Gaming Keyboards)
-- How to use this script:
-- 1. Install the Logitech Gaming Software: http://support.logitech.com/en_us/software/lgs
-- 2. Launch it, and right click on your profile (the gear icon) and then click on "Scripts".
-- 3. Add the following code into the Script window, save it, and close it. Enjoy.
-- Now G1 is bound to F13, G2 to G14, ... G12 to F24.
function OnEvent(event, arg)
-- OutputLogMessage("event = %s, arg = %s\n", event, arg)
@HenrikBengtsson
HenrikBengtsson / xerox_accounting_template.ppd
Last active January 6, 2022 19:39
Linux: Pass Accounting information to Xerox Printer via Postscript Printer Description (PPD)
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*% GENERAL ACCOUNTING
*%
*% Instructions:
*%
*% 1. Identify the accounting option or options used by the printer.
*%
*% 2. Replace the '{{...}}' placeholders with corresponding information
*% (without curly brackets). For example, '<22>XRX_USERID,{{userid}}<22>'
*% should become '<22>XRX_USERID,12345<22>'.
@bpmore
bpmore / sort-tabs.txt
Created June 9, 2016 17:41
Sort Tabs in Google Spreadsheets
1. Copy/Paste the information below to the clipboard
2. Open the spreadsheet whose sheets need to be alphabetised
3. Choose Tools > Script editor > Blank (this opens a new tab in the browser)
4. Press Control+A followed by Control+V copy and paste the script in
5. Press Control+S to save the script
6. Choose Run > sortSheets
7. Go back to the spreadsheet tab to view the new sorted tab order
--Copy everything below this line--
function sortSheets () {
@emilysnothere
emilysnothere / add_action.php
Last active January 31, 2023 07:39
Adding fields to the WordPress post submit box
add_action('post_submitbox_misc_actions', createCustomField);
add_action('save_post', saveCustomField);
@cuth
cuth / debug-scroll.md
Last active February 7, 2024 18:17
Find the elements that are causing a horizontal scroll. Based on http://css-tricks.com/findingfixing-unintended-body-overflow/

Debug Horizontal Scroll

(function (d) {
    var w = d.documentElement.offsetWidth,
        t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT),
        b;
    while (t.nextNode()) {
        b = t.currentNode.getBoundingClientRect();
 if (b.right &gt; w || b.left &lt; 0) {