Skip to content

Instantly share code, notes, and snippets.

View kylef000's full-sized avatar
๐Ÿ˜
Life's a peach

Kyle kylef000

๐Ÿ˜
Life's a peach
  • Charlotte, NC
View GitHub Profile
@SitePointEditors
SitePointEditors / dom-helper.js
Created March 28, 2017 09:56 — forked from m3g4p0p/dom-helper.js
Mini jQuery, sort of.
/**
* A collection of helper prototype for everyday DOM traversal, manipulation,
* and event binding. Sort of a minimalist jQuery, mainly for demonstration
* purposes. MIT @ m3g4p0p
*/
window.$ = (function (undefined) {
/**
* Duration constants
* @type {Object}
@gandarez
gandarez / ExamplePage.cshtml
Created July 12, 2016 13:55
Example of custom Hangfire page
@*
Generator: Template
TypeVisibility: Public
GeneratePrettyNames: true
Namespace: Hangfire.Dashboard.Pages
*@
@using System.Xml
@using Fator.Hangfire.Custom.Storage
@using Hangfire.Dashboard
@using Hangfire.Dashboard.Pages
@timothycrosley
timothycrosley / write_once.py
Last active March 31, 2021 20:37
Write once run every where
"""An example of writing an API to scrape hacker news once, and then enabling usage everywhere"""
import hug
import requests
@hug.local()
@hug.cli()
@hug.get()
def top_post(section: hug.types.one_of(('news', 'newest', 'show'))='news'):
"""Returns the top post from the provided section"""
@paulirish
paulirish / bling.js
Last active February 18, 2025 14:08
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@mallocator
mallocator / wikipedia.custom.css
Last active March 23, 2024 08:45
Custom CSS to make wikipedia look a little more readable based on css styles of medium.com. Sizes work for me on a macbook and windows with 1080p display. Used with MonoBook preset in appearance preferences.
body {
padding: 0 10%;
}
p {
text-align: left;
font-size: 18px;
letter-spacing: 0.08px;
line-height: 26px;
word-wrap: break-word;
@ericelliott
ericelliott / essential-javascript-links.md
Last active March 22, 2025 17:28
Essential JavaScript Links
@dgraham
dgraham / fetch.js
Last active March 24, 2023 15:44
Simple window.fetch wrapper.
(function() {
function status(response) {
if (response.ok) {
return response
} else {
var error = new Error(response.statusText || response.status)
error.response = response
throw error
}
}
@kylef000
kylef000 / CH5PC.java
Last active December 11, 2015 22:29
Assigns grade letters to 5 entered grades, then assigns a grade letter to the average of those grades totaled.
import javax.swing.JOptionPane;
public class CH5PC {
public static void main(String[] args) {
// Make an array to store our values! Save space!
double[] score;
score = new double[5];
// Declare some variables
String input;
int count = 0;