Skip to content

Instantly share code, notes, and snippets.

View AlexanderOMara's full-sized avatar
🇺🇦

Alexander O'Mara AlexanderOMara

🇺🇦
View GitHub Profile
@AlexanderOMara
AlexanderOMara / index.html
Last active February 19, 2019 22:30
iOS 8 position: fixed; input element workaround
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
<title>iOS 8 position: fixed; input element workaround</title>
<style>
* {
margin: 0;
padding: 0;
@AlexanderOMara
AlexanderOMara / shortcode-from-editor.php
Created June 5, 2015 19:44
do_shortcode inside shortcode
/*
Parses shortcodes inside shortcodes by passing the content into do_shortcode.
[testouter][testinner][/testinner][/testouter]
*/
function shortcode_test_outer( $atts, $content = null ) {
?><p>shortcode-outer-start</p><?php
do_shortcode( $content );
?><p>shortcode-outer-end</p><?php
@AlexanderOMara
AlexanderOMara / index.html
Last active November 9, 2015 07:51
WebKit Wheel Event Remove Window Crash
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>WebKit Wheel Event Remove Window Crash</title>
</head>
<body>
<script type="text/javascript">
/*<!--*/
(function(window) {'use strict';
@AlexanderOMara
AlexanderOMara / inverticon-patch.js
Created November 9, 2015 07:54
Firefox invertIconForLightTheme Addon-SDK polyfill.
/**
* Polyfill for invertIconForLightTheme option missing in Firefox < 43 Add-on SDK.
*
* @copyright Alexander O'Mara
* @license MPL-2.0
*
* Conditionally load this polyfill with the following version detection:
*
* const system = require('sdk/system');
* if (parseInt(system.platformVersion) < 43) {
@AlexanderOMara
AlexanderOMara / index.html
Last active January 24, 2016 08:29
this in strict mode
<!DOCTYPE html>
<html>
<head>
<title>this and strict mode</title>
</head>
<body>
<script>
'use strict';
alert('this === window: ' + (this === window));
</script>
@AlexanderOMara
AlexanderOMara / posixsemtest.c
Created March 6, 2016 03:46
Mac OS X POSIX semaphore test
// clang -Wall -o posixsemtest posixsemtest.c
#include <stdio.h>
#include <semaphore.h>
int main(int argc, char** argv) {
if (argc < 2) {
printf("USAGE: %s <semaphore_name>\n", argv[0]);
return 1;
@AlexanderOMara
AlexanderOMara / index.html
Created August 9, 2016 20:26
Edge Wheel Delta X Inverted Test
<!DOCTYPE html>
<html>
<head>
<title>Edge Wheel Delta X Inverted Test</title>
<style>
body {
background: #CCCCCC;
}
.panel {
overflow: scroll;
@AlexanderOMara
AlexanderOMara / index.html
Last active October 16, 2016 22:50
Stack Overflow logged in information leak.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' stackoverflow.com;">
<title>Are you logged in to Stack Overflow?</title>
</head>
<body>
<h1>Are you logged in to Stack Overflow?<h1>
<h2 id="answer">...<h2>
@AlexanderOMara
AlexanderOMara / index.html
Created April 24, 2017 03:39
Download large Blob Firefox issue on macOS
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Download large Blob Firefox issue on macOS</title>
</head>
<body>
<h1>Download large Blob Firefox issue on macOS</h1>
<h2>About</h2>
<p>Attempting to download a blob URL on macOS over a certain size will hang at "A few seconds left" without ever finishing the download.</p>
@AlexanderOMara
AlexanderOMara / index.html
Created May 1, 2017 20:02
Firefox IndexedDB Limit Test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Firefox IndexedDB Limit Test</title>
</head>
<body>
<script>
(function() {
'use strict';