Skip to content

Instantly share code, notes, and snippets.

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
* {
font-size: 8pt !important;
font-family: "Verdana" !important;
}
.newtab-cell {
margin-bottom: 0px !important;
margin-top: 0 !important;
@silvercircle
silvercircle / .vimrc
Last active September 15, 2017 04:14
my .vimrc
" .vimrc
"
" vim: fdm=indent:
" Only tested with vim 8.0 or later on Windows (native + Cygwin) and FreeBSD
"
" The following plugins are required (if any of them is not installed, errors on
" startup may occur)
" * pathogen (plugin manager)
" * neoComplete
@silvercircle
silvercircle / userContent.css
Last active April 3, 2017 13:01
My userContent for Thunderbird
/*
* Get rid of right quoting bar and unnecessary paddings.
*
* note: works best with the following settings in prefs.js or (preferrably)
* user.js
*
* user_pref("mail.quoted_graphical", false);
* user_pref("mail.quoteasblock", false);
*/
@silvercircle
silvercircle / userChrome.css
Last active March 23, 2024 01:19
My Thunderbird userChrome for square tabs + some minor UI tweaks
/*
* Thunderbird userChrome.css
*
* WARNING: This style was designed for TB version 60 and will likely not work
* with more recent versions (see comments)
*
* it's meant to be used with the default 3 panel split layout
*/
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@silvercircle
silvercircle / gist:7623266
Last active December 29, 2015 05:39
member function with named arguments, using boost parameters library
/*
* member function with named arguments, using boost parameters library
*/
#include <memory>
#include <boost/parameter/name.hpp>
#include <boost/parameter/preprocessor.hpp>
// just make it look prettier
#define __Param(x) BOOST_PARAMETER_NAME(x)
#define NamedParamMethod BOOST_PARAMETER_MEMBER_FUNCTION
@silvercircle
silvercircle / main.cpp
Created November 3, 2013 15:33
Console app in Qt with a QCoreApplication (just a personal note...)
#include <QCoreApplication>
#include <worker.h>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
Worker *w = new Worker(&a);
QObject::connect(w, SIGNAL(finished()), &a, SLOT(quit()));
@silvercircle
silvercircle / SingletonTestOnDemand.java
Created March 28, 2013 19:29
Singleton class, implemented using the "Pugh" Method
package at.or.miranda;
/**
* Singleton class with as-lazy-as-possible initialization not requiring
* explicit locking mechanisms.
*
* Also known as the "Pugh method" and generally accepted as a standard for creating
* singleton objects in a thread safe way.
*
* To fully understand this, it is necessary to understand how the class loader
@silvercircle
silvercircle / Gfx.cpp
Created March 27, 2013 20:49
colorizing bitmaps
/**
* colorize an image item (both standalone items with their own bitmap and glyph items).
*
* @param item image item to colorize
* @param clr color to use (note: BGRA format required, although, alpha is ignored)
* @param hue hue adjustment (in degrees, -180 .. +180
* @param saturation scalar value (0.0 ... 1.0)
* @param value scalar value (0.0 ... 1.0)
*
* note: this isn't performance critical as it only runs at skin loading time or when
@silvercircle
silvercircle / prank.js
Created March 25, 2013 13:48
JavaScript prank (images dance on webpage)
R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200;
DI=document.getElementsByTagName("img"); DIL=DI.length;
function A() {
var i;
var DIS;
for(i=0; i-DIL; i++){
DIS=DI[ i ].style;
DIS.position='absolute';