This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sqlite3 # yay SQLite! | |
import base64 | |
import os | |
import sys | |
if sys.version_info<(3,6,0): | |
print("You need python 3.6 or later to run this script.") | |
exit(-1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.io.Resources; | |
import com.google.gson.GsonBuilder; | |
import com.google.gson.JsonDeserializer; | |
import com.google.gson.JsonObject; | |
import java.io.IOException; | |
import java.net.URL; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import java.util.stream.Stream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// half-hearted CSS minification | |
$css = preg_replace( | |
array('/\s*(\w)\s*{\s*/','/\s*(\S*:)(\s*)([^;]*)(\s|\n)*;(\n|\s)*/','/\n/','/\s*}\s*/'), | |
array('$1{ ','$1$3;',"",'} '), | |
file_get_contents('linked.css') | |
); | |
// embed as a data: uri | |
$base64css = rtrim(strtr(base64_encode($css), '+/', '-_'), '='); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<form action="https://www.google.com/search" method="get" target="_blank" id="search-form"> | |
<input name="q" type="text" placeholder="Search Google..." autocomplete="off" autofocus> | |
<!-- <button type="button"><i class="fas fa-microphone"></i></button> --> | |
</form> | |
<p class="info"></p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="main.js"></script> | |
<link rel="stylesheet" href="main.css"> | |
<h1>Say Color:</h1> | |
<div class="color-cube"> | |
<div class="circle outer"> | |
<div class="circle inner"></div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name SCRIPT_NAME_HERE | |
// @namespace NAMESPACE | |
// @version 0.1 | |
// @description WIDGET_DESCRIPTION_HERE | |
// @match http*://*/* | |
// @include http*://*/* | |
// @copyright 2013+, YOURNAME | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name userscript boilerplate | |
// @namespace userscriptnamespace | |
// @version 1 | |
// @description Script description | |
// @author Author | |
// @match http://asdf.com/* | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-popup-overlay/2.1.1/jquery.popupoverlay.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery.serializeJSON/2.9.0/jquery.serializejson.min.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Use Markdown, sometimes, in your HTML. | |
// @author Paul Irish <http://paulirish.com/> | |
// @link http://git.io/data-markdown | |
// @match * | |
// ==/UserScript== | |
// If you're not using this as a userscript just delete from this line up. It's cool, homey. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Includes the CSS or JS file into the head of the page. | |
* | |
* Examples: | |
* include('http://example.com/script.js') | |
* include('http://example.com/style.css') | |
* include('http://example.com/script.php', 'js') | |
* @param {string} url URL of the CSS or JS file | |
* @param {string} [type] 'css' or 'js' to specify the type of file. | |
* This parameter is optional, but it should be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Open JSON | |
// @version 1.0.0 | |
// @description Opens JSON in a json-viewer window | |
// @match http://*/* | |
// @match https://*/* | |
// ==/UserScript== | |
const exec = fn => { | |
const script = document.createElement('script'); |