Skip to content

Instantly share code, notes, and snippets.

View JoshuaJones's full-sized avatar
:shipit:

Joshua Jones JoshuaJones

:shipit:
View GitHub Profile
@shauninman
shauninman / custom.css
Created December 14, 2020 17:25
white out promoted tweets on twitter.com
/* bye-bye brands */
div[aria-label~="Timeline"] div[role="group"]+div{background-color:white;position:absolute !important;top:-24px !important;left:-64px !important;margin-top:0 !important;width:calc(100% + 64px);height:calc(100% + 24px);}
div[aria-label~="Timeline"] div[role="group"]+div *{display:none !important;}
@BeKnowDo
BeKnowDo / windows-10.md
Last active July 8, 2024 10:58
Windows 10 sucks...but we can make it less sucky. This is how I setup local development for Win10

Install Chocolately

Install ConEmu

  • Install via chocolately choco install conemu -y

Install Nginx

  • Install via chocolately choco install nginx -y ** The -y argument is to skip any confirmation messages...just install it. It's fine ;)
// Discord all events!
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!)
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client
// Learn from this, do not just copy it mofo!
//
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584
// Last Updated -> Halloween 2022
/*
@daredude
daredude / docker-clear.bat
Created June 5, 2016 10:53
delete all docker container and images on windows
@echo off
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i
@paulirish
paulirish / what-forces-layout.md
Last active July 18, 2024 22:41
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@paulirish
paulirish / bling.js
Last active July 3, 2024 20:45
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@ronaldsmartin
ronaldsmartin / GoogleSheetJson.md
Last active December 16, 2023 06:53
Google Spreadsheet JSON Queries

SheetAsJSON + Filtering

This is an extension of DJ Adams' excellent SheetAsJSON Google Apps Script, which provides a way to GET a published Google Spreadsheet as a JSON feed. This version allows generic filtering for terms, more specific control over which rows to parse, and correct MIME type for JSONP output.

Minimal Usage

The following parameters are required for the script to work.

https://script.google.com/macros/s/AKfycbzGvKKUIaqsMuCj7-A2YRhR-f7GZjl4kSxSN1YyLkS01_CfiyE/exec?
+ id=<spreadsheet key>
+ sheet=<sheet name on spreadsheet>
@PaulKinlan
PaulKinlan / criticalcss.html
Last active March 15, 2023 02:13
Detect Critical CSS
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<h2>Original CSS</h2>
<style style="display: block; white-space: pre; font-family: monospace">
h2 { margin:0; }
@kkirsche
kkirsche / Install Composer to use MAMP's PHP.md
Last active January 30, 2024 02:30
How to install Composer globally using MAMP's PHP

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

@nathanaelnsmith
nathanaelnsmith / custom-upload.html
Last active December 10, 2015 21:58
Hide the file input using css, create a disabled text input to display file name once selected, use custom button to trigger file browse click. After file is selected, JS grabs value and inserts into text field.
<span class="custom-upload">
<i class="icomoon-upload"></i>
<input type="file" name="receipt" id="receipt" class="in-lrg">
<input type="text" name="file-name" id="file-name" class="in-lrg" disabled>
</span>