Skip to content

Instantly share code, notes, and snippets.

@minitech
minitech / dabblet.css
Created October 8, 2012 17:21
✎'s "Under Construction" page prototype
/**
* ✎'s "Under Construction" page prototype
*/
/* Background
-------------------------------*/
body {
background-color: #ccc;
}
@minitech
minitech / gist:3980564
Created October 30, 2012 14:37
A shutdown with confirmation for Windows 8 pinning
If MsgBox("Are you sure you want to shut down?", vbExclamation Or vbYesNo Or vbDefaultButton2, "Shut down") = vbYes Then
Dim wsh : Set wsh = CreateObject("WScript.Shell")
wsh.Run "shutdown /s /t 0"
End If
@minitech
minitech / dabblet.css
Created November 7, 2012 15:29
Using a box-shadow to mimic a gradient
/**
* Using a box-shadow to mimic a gradient
*/
#item {
background-color: #07f;
border-radius: 0.2em;
box-shadow: inset 0 -1em 1em -0.5em rgba(0, 0, 0, 0.7);
color: white;
display: inline-block;
@minitech
minitech / dabblet.css
Created November 7, 2012 15:49
Absolute positioning for full height
/**
* Absolute positioning for full height
*/
body {
margin: 0;
}
#container {
background-color: #07f;
@minitech
minitech / price-format-modified.js
Created November 25, 2012 18:20
Price Format Modification
/*
* Note: This was a bugfix for http://stackoverflow.com/a/9454335/707111.
* I submitted a pull request (https://github.com/flaviosilveira/Jquery-Price-Format/pull/5),
* which was ignored. I'm leaving this here so that my answer isn't entirely useless,
* but the project has been updated since.
* Price Format jQuery Plugin
* Created By Eduardo Cuducos cuducos [at] gmail [dot] com
* Currently maintained by Flavio Silveira flavio [at] gmail [dot] com
@minitech
minitech / web-checklist.md
Last active January 4, 2020 11:59
minitech’s Web Checklist

minitech’s Web Checklist

Here are some guidelines that will make me actually like your amazing new web application!

  1. Make sure encoding is handled properly every step of the way. If comes out as ’, you’ve got a problem on your hands. 😊

  2. Make it accessible. Turn off images, JavaScript, and CSS. If your website is still legible and usable (it’s okay if it’s just barely usable, or not particularly interactive) then you are already in the top 0.01%.

  3. Check your grammar. One of the fastest ways to lose respect in a blog post (or worse — in body copy) is to make basic orthographical or grammatical mistakes. These include, but are not limited to:

  • Missing apostrophes — [Bitbucket even did that][bitbucket-apostrophe-catastrophe].
@minitech
minitech / dont-pass-undefined.md
Last active December 10, 2015 02:58
Why you shouldn’t pass an `undefined` to your wrapper.

A common pattern is to make sure that undefined is actually what it says it is, using some kind of wrapper function:

(function(undefined) {
    // undefined will be undefined now, even if some idiot overwrote it.
})();

Why you shouldn’t do that:

@minitech
minitech / gist:4544960
Created January 16, 2013 05:47
Why I don't use Firefox at the moment.
  • When I open a new tab, the URL bar has focus. I start typing in it. After a while, it highlights the text I've typed and I start typing over it.
  • It has a lot of options, but none of the ones I care about (with the exception of the proxy configuration. What's up with this in Chrome/ium?). What's auto-scrolling, and where can I configure my plugins to, say, start on click? Wait, I can't. (If I can, I haven't found it. Sorry.)
  • Changing search engines properly requires messing around in about:config. I should not have to do this. Or download a plugin (which don't necessarily exist for a given search engine).
  • There are a bunch of different developer consoles, only about one of which - Ctrl+Shift+K - is actually useful, but still lacks the CSS debugging information from Ctrl+Shift+J. Can't we all just put this in one place, please? Also, the Net panel doesn't include responses, just headers, which is not always useful. Or ever. I know, I can use Firebug, but still.
  • Private browsing
@minitech
minitech / valid-html4.js
Last active December 11, 2015 08:58
Checking for a valid HTML4 tag name using an object.
var html4 = {
A: true, ABBR: true, ACRONYM: true, ADDRESS: true, APPLET: true, AREA: true, B: true, BASE: true, BASEFONT: true,
BDO: true, BIG: true, BLOCKQUOTE: true, BODY: true, BR: true, BUTTON: true, CAPTION: true, CENTER: true, CITE: true,
CODE: true, COL: true, COLGROUP: true, DD: true, DEL: true, DFN: true, DIR: true, DIV: true, DL: true, DT: true, EM: true,
FIELDSET: true, FONT: true, FORM: true, FRAME: true, FRAMESET: true, H1: true, H2: true, H3: true, H4: true, H5: true,
H6: true, HEAD: true, HR: true, HTML: true, I: true, IFRAME: true, IMG: true, INPUT: true, INS: true, ISINDEX: true,
KBD: true, LABEL: true, LEGEND: true, LI: true, LINK: true, MAP: true, MENU: true, META: true, NOFRAMES: true,
NOSCRIPT: true, OBJECT: true, OL: true, OPTGROUP: true, OPTION: true, P: true, PARAM: true, PRE: true, Q: true, S: true,
SAMP: true, SCRIPT: true, SELECT: true, SMALL: true, SPAN: true, STRIKE: true, STRONG: true, STYLE: true, SUB: true,
SUP: true, TABLE: true, TBODY: true