Skip to content

Instantly share code, notes, and snippets.

View saylestyler's full-sized avatar
🥰
= )

Tyler Sayles saylestyler

🥰
= )
View GitHub Profile
@pmarquees
pmarquees / editPage.js
Last active October 7, 2024 23:59
Edit page (bookmarklet)
javascript:document.body.contentEditable = 'true'; document.designMode='on'; void 0
@lhorie
lhorie / longest-keyword-sequence.md
Last active November 13, 2024 04:15
What's the longest keyword sequence in Javascript?
{
"working": {
"https://www.sitespeed.io": [
{
"metric": "firstPaint",
"type": "timings",
"value": 351,
"friendlyValue": "351 ms",
"limit": 1000,
"friendlyLimit": "1.000 s",
@mkhamat
mkhamat / firefox-userjs-generator.js
Last active October 21, 2020 19:34
Firefox User.js Generator
/**
* This is script for https://gist.github.com/0XDE57/fbd302cef7693e62c769
* remove descriptions and leave only config lines!
* put it in txt file and pass path to it through arg
* example: node index.js ./config.txt
*
* user.js will appear in the same directory
*
*/
import Foundation
import PlaygroundSupport
/// A thread-safe array.
public class SynchronizedArray<Element> {
private let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent)
private var array = [Element]()
public init() { }
"stick this shit in a markdown ftplugin
"
"Usage:
"
"Open a markdown file.
"Use the :MdLive command.
"Save the file and it will update
command MdLive call s:InitMarkdownHacks()
autocmd bufwritepost <buffer> call s:CheckToBuildMd()

Comparison of configuration file languages

We need to PEPify a static format for writing down bootstrap information in Python source trees. The initial target is a list of PEP 508 package requirement strings. It's possible that in the future we might want to add more features like a build system backend specification (as in PEPs 516, 517), or an extension namespace feature to allow third-party developer tools (flit, pytest, coverage, flake8, etc.) to consolidate their configuration in this file in a systematic

@kawaz
kawaz / install_neovim_to_amazonlinux.sh
Last active March 30, 2025 11:14
install neovim to amazonlinux
#!/usr/bin/env bash
sudo yum groups install -y Development\ tools
sudo yum install -y cmake
sudo yum install -y python34-{devel,pip}
sudo pip-3.4 install neovim --upgrade
(
cd "$(mktemp -d)"
git clone https://github.com/neovim/neovim.git
cd neovim
make CMAKE_BUILD_TYPE=Release
@ebidel
ebidel / polymer-perf-bookmarklet.js
Last active May 1, 2021 15:42
Polymer performance numbers bookmarklet
javascript:(function(){(function printStats(){var loadTimes=window.chrome.loadTimes();firstPaint=loadTimes.firstPaintTime*1000;firstPaintTime=firstPaint-(loadTimes.startLoadTime*1000);console.info('First paint took',firstPaintTime,'ms');console.info('Load took',performance.timing.loadEventStart-performance.timing.navigationStart,'ms');var instances=0;if(parseFloat(Polymer.version)<1){instances=[].slice.call(document.querySelectorAll('html /deep/ *')).filter(function(el){return el.localName.indexOf('-')!=-1||el.getAttribute('is');}).length;}else{instances=Polymer.telemetry.instanceCount;}console.info('Custom element instances:',instances);var reflectCount=0;if(Polymer.telemetry){console.info('=== Properties set to reflectToAttribute ===');Polymer.telemetry.registrations.forEach(function(el){for(var prop in el.properties){if(el.properties[prop].reflectToAttribute){console.log(el.is+'.'+prop);reflectCount++;}}});}else{console.info('=== Properties set to reflect ===');Polymer.elements.forEach(function(el){for(var