Skip to content

Instantly share code, notes, and snippets.

View wgminer's full-sized avatar
🌴
On vacation

Will Miner wgminer

🌴
On vacation
View GitHub Profile
@wgminer
wgminer / timetable.html
Created July 1, 2014 15:27
Timetable Styling
<div id="timetable" timetable="">
<div class="title">
<h2>{{ mainCtrl.name }}</h2>
<button ng-click="<!-- create new function -->" class="button small green">Create New</button>
<button ng-click="<!-- enter room now function -->" class="button small">Enter a Room Now</button>
</div>
<div class="date-bar">
<!-- these buttons should activate/deactivate based on position -->
.input-forms {
width: 784px;
font-weight: 300;
font-family: helvetica, arial, sans-serif;
font-size: 14px;
}
.input-forms .header {
font-weight: 400;
border-bottom: solid 1px #ccc;
margin-bottom: 50px;
<div id="timetable>
<div class='title'>
<h2>{{ mainCtrl.name }}</h2>
<button class='button small green'>Create New</button>
<button class='button small'>Enter My Room Now</button>
</div>
<div class='date-bar'>
<button class='first' ng-click='mainCtrl.changeDisplayedDate(mainCtrl.displayed_date, -7)'>
<i class='fa fa-angle-double-left'></i>
</button>
@wgminer
wgminer / index.html
Created July 11, 2014 14:27
UXI-435 Code
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/main.css">
</head>
<div id='timetable'>
<div class='title'>
<h2>{{ mainCtrl.name }}</h2>
<div class="actions">
<a meeting-form ng-click="mainCtrl.openModal()">Create New</a>
<span>|</span>
<a>Enter My Room Now</a>
</div>
</div>
<div class='date-bar'>
.border-radius(@radius) {
border-radius: @radius;
-moz-border-radius: @radius;
-webkit-border-radius: @radius;
}
#timetable {
font-size: 14px;
color: #333;
font-weight: 400;
@wgminer
wgminer / random.js
Created October 3, 2014 16:41
Random object selector
function randomArrayElement(array) {
var i = Math.floor(Math.random() * array.length);
return array[i];
}
@wgminer
wgminer / wcag-contrast-ratio.js
Last active February 12, 2025 00:20
A simple JavaScript function that takes two hex color values and calculates their contrast ratio (according to the WCAG 2.0 guidelines).
var contrast = function (foreground, background) {
var hexToRgb = function (hex) {
// Expand shorthand form (e.g. '03F') to full form (e.g. '0033FF')
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
hex = hex.replace(shorthandRegex, function(m, r, g, b) {
return r + r + g + g + b + b;
@wgminer
wgminer / App.js
Last active December 6, 2019 21:23
Add markdown list item on enter to textarea
import React, { Component } from 'react';
import './App.css';
class App extends Component {
constructor(props) {
super(props);
this.state = {
text: '- asda'
};
@wgminer
wgminer / agent.js
Created February 4, 2025 15:38
A simple directory concatenator for easy copy and paste into a LLM
import fs from "fs";
import path from "path";
import { fileURLToPath } from "url";
import clipboardy from "clipboardy";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const INPUT_DIR =
process.argv[2] || "/Users/jsmith/MyExampleProject";