Skip to content

Instantly share code, notes, and snippets.

@collinbarrett
collinbarrett / userChrome.css
Last active April 11, 2024 10:22
A userChrome.css to use with Tree Style Tab (https://github.com/piroor/treestyletab) for Firefox
/*
Windows
Location: C:\Users\<YourUsername>\AppData\Roaming\Mozilla\Firefox\Profiles\<YourFirefoxProfile>\chrome
Notes:
If minimize, maximize, and close buttons are no longer visible, enable the Title Bar or Menu Bar in Firefox Customize.
macOS
Location: /Users/<YourUsername>/Library/Application Support/Firefox/Profiles/<YourFirefoxProfile>/chrome
Notes:
If minimize, maximize, and close buttons overlap other controls, add the Flexible Space in Firefox Customize.
@jimschubert
jimschubert / Markdown-JavaScript.markdown.js
Last active September 24, 2023 13:31
DataGrip (IntelliJ) output SQL results to Markdown
if (!String.prototype.repeat) {
// polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat
String.prototype.repeat = function(count) {
'use strict';
if (this == null) {
throw new TypeError('can\'t convert ' + this + ' to object');
}
var str = '' + this;
count = +count;
if (count != count) {
@Guest007
Guest007 / set_ff.md
Last active April 4, 2023 13:28
Настройка Firefox

I. СОЗДАНИЕ НОВОГО ПРОФИЛЯ

Используйте менеджер профилей, чтобы создать новый профиль Firefox.

LINUX:

В терминале (консоли) Linux исполните команду от обычного пользователя:

firefox -P
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd"
default-activation="lazy">
fix for hotkeys not functional in non-latin keyboard layout in 13.10 / 14.04
tested on ubuntu 14.04, jvm7 and rubymine 6.3
sudo add-apt-repository ppa:attente/java-non-latin-shortcuts
sudo apt-get update
sudo apt-get dist-upgrade
restart unity-settings-daemon
now ctrl+c, ctrl-v etc should work in most java applications like IDEA, RubyMine IDE even on russian keyboard layout
@pulkitsinghal
pulkitsinghal / customBindingFile.xjb
Created December 28, 2013 19:41
How to get Java POJOs, generated from schema files, to implement custom interfaces via maven plugins
<?xml version="1.0"?>
<jxb:bindings version="1.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
jxb:extensionBindingPrefixes="xjc">
<jxb:bindings schemaLocation="../schema/yourSchemaFile.xsd">
<jxb:bindings node="//xs:complexType[@name='SomeElementNameFromYourSchemaFile']">
@jewelsea
jewelsea / H2Tasks.java
Last active March 5, 2024 22:24
Sample for accessing a local database from JavaFX using concurrent tasks for database operations so that the UI remains responsive.
package h2app;
import javafx.application.Application;
import javafx.collections.*;
import javafx.concurrent.Task;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.stage.Stage;
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@ymnk
ymnk / AES.java
Last active July 20, 2023 15:54
JSch examples
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/**
* This program will demonstrate how to use "aes128-cbc".
*
*/
import com.jcraft.jsch.*;
import java.awt.*;
import javax.swing.*;
public class AES{