Skip to content

Instantly share code, notes, and snippets.

@sfinktah
sfinktah / python.snippets
Last active August 20, 2021 07:17
UltiSnips auto-completions that don't expand in comments
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)')")
// ==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
@sfinktah
sfinktah / PlayerList.java
Created October 15, 2020 17:14
PlayerList
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.*;
@sfinktah
sfinktah / PlayerWrapper.java
Created October 15, 2020 17:13
PlayerWrapper PlayerWrapper
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;
@sfinktah
sfinktah / ActionRouter.java
Created October 12, 2020 15:54
A slots and signals variation for ActionEvent/ActionListener
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
@sfinktah
sfinktah / Debug.java
Created October 10, 2020 10:11
Ultra-light Java Debugging Class
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) {
{
"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],
@sfinktah
sfinktah / index.html
Created September 21, 2016 07:56 — forked from anonymous/index.html
JS Bin Process Chrome stack trace into detailed call tree // source http://jsbin.com/rapoxo
<!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>
This file has been truncated, but you can view the full file.
// Disassembled by Sasuke78200
// sfinktah: frequently access subroutines renamed:
// 7237 label_3f24 to common7
// 4894 label_3ac2 to common4
// 1209 label_3452 to common1
enter 0 2
ipush 1
setstatic 2
ipush 134
<?php
define("EOF", false);
class DeMap {
var $tail = false;
var $debug = false;
var $fileName = false;
var $fileHandle = false;
var $global_header;
var $eof = false;