To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
// ==UserScript== | |
// @name SCRIPT_NAME_HERE | |
// @namespace NAMESPACE | |
// @version 0.1 | |
// @description WIDGET_DESCRIPTION_HERE | |
// @match http*://*/* | |
// @include http*://*/* | |
// @copyright 2013+, YOURNAME | |
// ==/UserScript== |
// ==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 |
// ==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. |
/** | |
* 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 |
// ==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'); |
// Providing Context | |
// ================== | |
import React, {useState, useEffect} from "react" | |
const Context = React.createContext() | |
function ContextProvider({children}) { | |
const [allPhotos, setAllPhotos] = useState([]) | |
const [cartItems, setCartItems] = useState([]) |
# Save the transcripts using the "Save Page WE" Chrome Extension | |
# This script was generated by ChatGPT | |
import sys | |
from bs4 import BeautifulSoup | |
# Check if a file was provided as a command line argument | |
if len(sys.argv) < 2: | |
print("Please provide an HTML file as a command line argument.") | |
sys.exit(1) |
Background page is kind of like you own mini server - it is a completely isolated page that has nothing to do with pages a user visits. It is used for controlling the rest of extension components as it is always running in background. | |
Content scripts are pieces of javascript code that are getting injected into actual pages a user visits and can access and modify parent page's DOM. | |
So to get your extension working you need to remove | |
<script src="jquery.min.js"></script> | |
<script src="content.js"></script> | |
from background page, and inject jquery as a content script either through manifest: |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
#!/bin/bash | |
#=================================================================================== | |
# ubuntu_devenv.sh | |
# http://symbiosoft.net/ubuntu_devenv | |
# | |
# (K)UBUNTU - POST INSTALLATION SCRIPT THAT SETUP A DEVELOPER ENVIRONMENT | |
# | |
# TODOLIST | |
#---------------------------------------------------------------------------------- | |
# - Simulation (no changes) |