Skip to content

Instantly share code, notes, and snippets.

View nickgrealy's full-sized avatar

Nick Grealy ⚡️ nickgrealy

View GitHub Profile
@nickgrealy
nickgrealy / dabblet.css
Created July 16, 2014 00:14
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
div{color:white;font-weight:bold;height:30px;width:97px;text-align:center;line-height:30px;
background: linear-gradient(180deg,#dd4b39,#d14836);
border: 1px solid transparent;
text-shadow: 0 1px rgba(0,0,0,0.1);
text-transform: uppercase;
border-radius: 2px;
cursor: default;
input { border:1px solid grey; border-radius:2px; padding:2px 10px; }
input:link {color:red;} /* unvisited link */
input:visited {color:lime;} /* visited link */
input:hover {color:orange;} /* mouse over link */
input:active {color:blue;} /* selected link */
input { border:1px solid grey; border-radius:2px; padding:2px 10px; }
input:link {color:red;} /* unvisited link */
input:visited {color:lime;} /* visited link */
input:hover {color:orange;} /* mouse over link */
input:active {color:blue;} /* selected link */
# HTTP protocol works!
nas4free: ufs3 # fetch -T 60 -v http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/9.2-RELEASE/base.txz
looking up ftp.freebsd.org
connecting to ftp.freebsd.org:80
requesting http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/9.2-RELEASE/base.txz
local size / mtime: 67671040 / 1380284398
remote size / mtime: 67671964 / 1380284398
base.txz 100% of 64 MB 451 kBps 02m26s
nas4free: ufs3 #
import javax.imageio.ImageIO;
import javax.swing.*;
import javax.swing.event.InternalFrameEvent;
import javax.swing.plaf.basic.BasicInternalFrameUI;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
public class PhoneWindow {
@nickgrealy
nickgrealy / SynchronizedInternetExplorerDriver.java
Last active February 5, 2020 08:31
Class to synchronise calls to the WebDriver instance.
package selenium.webdrivers;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.ie.InternetExplorerDriverService;
import org.openqa.selenium.remote.Response;
import java.util.Map;
/**
var PartnerDetail = (function ($) {
"use strict";
var _partnerId = -1;
var getPartnerId = function () {
return _partnerId;
};
@nickgrealy
nickgrealy / Application.java
Last active October 26, 2015 01:22
143-X-Forwarded-Path
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import javax.servlet.Filter;
import java.net.URI;
import static hello.HeaderOverrideFilter.buildForwardedHeadersFilter;
@nickgrealy
nickgrealy / InetAddressUtils.java
Last active May 12, 2016 01:08
Utility class for doing DNS reverse lookups, without the fluff.
import sun.net.spi.nameservice.NameService;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Field;
import java.net.InetAddress;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.List;
Empty contextPath
null
java.lang.NoSuchMethodError: hudson.model.Messages.ExternalJob_DisplayName()Ljava/lang/String;
at hudson.model.ExternalJob$DescriptorImpl.getDisplayName(ExternalJob.java:132)
at hudson.ExtensionComponent.compareTo(ExtensionComponent.java:97)
at hudson.ExtensionComponent.compareTo(ExtensionComponent.java:42)
at java.util.ComparableTimSort.binarySort(ComparableTimSort.java:232)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:176)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
at java.util.Arrays.sort(Arrays.java:472)