Skip to content

Instantly share code, notes, and snippets.

@NoUsername
NoUsername / imageViewer.html
Created March 2, 2014 15:38
Simple image viewer, which loads all images from an html directory listing.
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
</head>
<body>
<img id="viewer" src="" width="800px"/>
<div id="info"> </div>
<script>
$(function() {
@NoUsername
NoUsername / file-hashes-on-windows
Created June 20, 2022 20:47
Simple command to get various kinds of file-hashes on windows (without installing additional tools)
certutil -hashfile targetFile.txt md5
certutil -hashfile targetFile.txt sha1
certutil -hashfile targetFile.txt sha256
@NoUsername
NoUsername / 1.gif
Last active January 9, 2022 08:11
First
1.gif
@NoUsername
NoUsername / 2.gif
Created January 9, 2022 08:09
Second
2.gif
@NoUsername
NoUsername / downloadLatestChromeDriver.py
Created December 20, 2016 12:17
simple script for downloading the latest chromedriver with python
import requests
from xml.dom import minidom
from subprocess import call
from distutils.version import StrictVersion
def checkValidVersion(s):
if len(s) < 1:
return None
try:
parsed = float(s[:-1])
@NoUsername
NoUsername / advofcode01.cob
Created December 8, 2017 18:20
Cobol solution for advent of code 2017 day 1
IDENTIFICATION DIVISION.
PROGRAM-ID. advofcode01.
AUTHOR Paul Klingelhuber
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT InpFile ASSIGN TO "ADVOFCODE01.DAT"
ORGANIZATION IS LINE SEQUENTIAL.
// AI.java
public interface AI
{
String getName();
}
// A.java
@Service
public class A implements AI
@NoUsername
NoUsername / downloadLatestChromeDriver.py
Created December 20, 2016 12:17
simple script for downloading the latest chromedriver with python
import requests
from xml.dom import minidom
from subprocess import call
from distutils.version import StrictVersion
def checkValidVersion(s):
if len(s) < 1:
return None
try:
parsed = float(s[:-1])
@NoUsername
NoUsername / sonic-pi-drums.rb
Created November 13, 2016 21:02
playing around with sonic-pi
use_bpm 120
kicks = [1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0].ring
snares = [1,0,1,0, 1,0,0,1, 0,0,1,0, 0,0,1,0].ring
drum = [0,0,0,0, 0,0,0,1, 0,0,0,0, 0,0,0,0].ring
drum2 = [1,0,1,0, 0,0,1,0, 0,0,1,0, 0,0,1,0].ring
live_loop :drums do
pos = tick
if kicks[pos] == 1 then
@NoUsername
NoUsername / activate-hibernate-logging.java
Created November 9, 2016 14:22
small snippet of code that you can quikly run in the debugger or drop into a test-file to activate hibernate logging without futzing with project/environment
((ch.qos.logback.classic.Logger)org.slf4j.LoggerFactory.getLogger("org.hibernate.SQL")).setLevel(ch.qos.logback.classic.Level.DEBUG);
((ch.qos.logback.classic.Logger)org.slf4j.LoggerFactory.getLogger("org.hibernate.type")).setLevel(ch.qos.logback.classic.Level.TRACE);