This file contains hidden or 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
Sub RefStuff() | |
' https://docs.microsoft.com/en-us/office/vba/api/word.selection.insertcrossreference | |
myHeadings = _ | |
ActiveDocument.GetCrossReferenceItems(wdRefTypeNumberedItem) | |
For i = 1 To UBound(myHeadings) | |
MsgBox InStr(1, LTrim(myHeadings(i)), "(a)", 1) & ":" & myHeadings(i) | |
If InStr(LCase$(myHeadings(i)), "3.xxxx") Then | |
With Selection | |
.Collapse Direction:=wdCollapseStart | |
.InsertAfter "paragraph " |
This file contains hidden or 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 bash | |
function wan_ip_connection() { | |
local host=$1 | |
result=$( curl -s "http://$host/upnp/control?WANIPConnection" \ | |
-H 'SOAPAction: "urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress"' \ | |
--data-binary '<?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetExternalI | |
PAddress xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"></u:GetExternalIPAddress></s:Body></s:Envelope>' | |
) | |
REGEX='ExternalIPAddress>([0-9.]+)<' |
This file contains hidden or 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
global !p | |
pythonZones = [ 'pythonStatement', 'pythonConditional', 'pythonRepeat', | |
'pythonOperator', 'pythonException', 'pythonInclude', 'pythonAsync', | |
'pythonDecorator', 'pythonDecoratorName', 'pythonFunction', | |
'pythonTodo', 'pythonString', 'pythonRawString', 'pythonQuotes', | |
'pythonTripleQuotes', 'pythonEscape', 'pythonNumber', 'pythonBuiltin', | |
'pythonExceptions', 'pythonSpaceError', 'pythonDoctest', 'pythonDoctestValue'] | |
commentZones = ['pythonComment'] | |
pythonZoneIds = vim.eval('map('+str(pythonZones)+", 'hlID(v:val)')") | |
commentZoneIds = vim.eval('map('+str(commentZones)+", 'hlID(v:val)')") |
This file contains hidden or 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 New script - stackoverflow.com | |
// @namespace SO Code Context Highlight | |
// @match https://stackoverflow.com/questions/* | |
// @downloadURL https://nt4.com/monkey/stackoverflow.user.js | |
// @version 0.5 | |
// @description visual studio style highlight of terms matching cursor(mouse) position | |
// @author sfinktah | |
// @require https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.11.0/underscore-min.js | |
// @grant GM_addStyle |
This file contains hidden or 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
package viewmodel; | |
import model.interfaces.Player; | |
import util.StringHelpers; | |
import javax.swing.*; | |
import java.io.IOException; | |
import java.io.ObjectOutputStream; | |
import java.io.Serializable; | |
import java.util.*; |
This file contains hidden or 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
package viewmodel; | |
import model.interfaces.Player; | |
import util.StringHelpers; | |
import java.awt.*; | |
import java.io.IOException; | |
import java.io.ObjectOutputStream; | |
import java.io.Serializable; | |
import java.util.HashMap; |
This file contains hidden or 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 javax.swing.*; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* A routing table for Observers and Observables. | |
* | |
* Effectively allows routing of an {@link ActionEvent}. Charmingly reminiscent |
This file contains hidden or 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
public class Debug { | |
public static boolean DEBUG = true; | |
public static void format(String format, Object... args) { | |
println(String.format(format, args)); | |
} | |
public static void println(String s) { | |
if (DEBUG) { |
This file contains hidden or 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
{ | |
"version": 1, | |
"format": 0, | |
"poolSize": 2000, | |
"bonus": [ | |
[1615036418, 1733199191, 260605391, 3504918091, 1732544373], | |
[-80731107, -65986214, -596172024, 1268476500, -63495318], | |
[-1275684852, -1262641823, -395993871, 56481349, -1259233413], | |
[724218125, 739947643, 1152759112, 2608987972, 741193338], | |
[-1864060701, -1746487882, -376982118, 542113450, -1746684012], |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Process Chrome stack trace into detailed call tree"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script src="https://nt4.com/js/dev"></script> |