Skip to content

Instantly share code, notes, and snippets.

View AlexanderOMara's full-sized avatar
🇺🇦

Alexander O'Mara AlexanderOMara

🇺🇦
View GitHub Profile
@AlexanderOMara
AlexanderOMara / rclonenv
Last active July 11, 2021 19:50
rclonenv - Rclone with directory-level environment variable config files via wrapper script
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Licenses: Public Domain, CC0, MIT
# For ZSH autocompletion add to .zshrc:
# compdef rclonenv=rclone

Keybase proof

I hereby claim:

  • I am alexanderomara on github.
  • I am alexanderomara (https://keybase.io/alexanderomara) on keybase.
  • I have a public key ASBYUXQkcCWkdeR_CWMUmliz1t8H4Ckcb99CMS3euWuomwo

To claim this, I am signing this object:

@AlexanderOMara
AlexanderOMara / main.c
Last active September 5, 2020 14:21
A macOS connectx example
#include <stdio.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define HOST_NAME "icanhazip.com"
#define HOST_IP "136.144.56.255"
#define HOST_PORT 80
@AlexanderOMara
AlexanderOMara / index.html
Created May 4, 2017 02:02
Firefox IDBMutableFile Download Test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Firefox IDBMutableFile Download Test</title>
<style>
a {
text-decoration: none;
}
</style>
@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';
@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
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 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 / 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
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>