Skip to content

Instantly share code, notes, and snippets.

View hcharley's full-sized avatar
🏗️
making things (better)

Honest Charley Bodkin hcharley

🏗️
making things (better)
View GitHub Profile
@hcharley
hcharley / 1-README.md
Last active December 2, 2023 06:00
Tic Tac Toe coding exercise

Exercise

// Tic Tac Toe

// Implement a simulated Tic-tac-toe game that is played between two players on a 3 x 3 grid.

// You may assume the following rules:
#!/usr/bin/env bash
# Use this script to test if a given TCP host/port are available
WAITFORIT_cmdname=${0##*/}
echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi }
usage()
{
cat << USAGE >&2

osys-template-language

This is reference material for developing osys email templates for Osmosys.

Osmosys's templating language osys uses HTML attributes to describe how the DOM should be parsed into both an interactive UI and an automated, dynamic template that can be generated on a server.


A quick note about this document's style:

@hcharley
hcharley / countParentsOfQuerySelector.js
Created March 13, 2018 19:39
countParentsOfQuerySelector.js
function countParentsOfQuerySelector(el, parentQuerySelector) {
let parentEl = el.parentNode;
let parentCount = 0;
while (parentEl) {
if (parentEl.matches(parentQuerySelector)) {
parentCount += 1;
}
parentEl = parentEl.parentNode;
}
return parentCount;
@hcharley
hcharley / 1. template.html
Last active June 25, 2017 08:18
Stickied nav bar
<header>
<div class="never-ever">
</div>
<div class="left-behind">
</div>
<div class="carried-onward">
</div>
import {Scene, Router} from 'react-native-router-flux';
import Login from 'containers/login';
import Register from 'containers/register';
import Home from 'containers/home';
class App extends React.Component {
render() {
return <Router>
<Scene key="root">
<Scene key="login" component={Login} title="Login"/>
@hcharley
hcharley / logging-app-utils.js
Last active June 1, 2017 00:32
Logging config in JS
/**
* utils.js
*/
import Radio from 'backbone.radio';
var CHANNEL = Radio.channel('quickpost-app');
var my_util_function = function() {
var logger = CHANNEL.request('get_logger', 'utils');
var webpack = require('webpack');
var path = require('path');
var DashboardPlugin = require('webpack-dashboard/plugin');
var LiveReloadPlugin = require('webpack-livereload-plugin');
var STATIC_DIR = path.resolve(
__dirname,
'path/to/my/static/files/'
),
BUILD_DIR = path.join(STATIC_DIR, '/dist_js/'),
<table>
<tbody style="word-break:keep-all;-moz-hyphens:none;-ms-hyphens:none;-webkit-hyphens:none;hyphens:none;">
<tr>
<td style="background-color:#2A5A9B;padding:10px;font-weight:bold;color:white;word-break:keep-all;-moz-hyphens:none;-ms-hyphens:none;-webkit-hyphens:none;hyphens:none;"><span>Sponsored Content by California Resource Corporation</span></td>
</tr>
<tr>
<td style="padding:10px;background-color:#EBF1F9;font-family: Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; margin-top: 8px;word-break:keep-all;-moz-hyphens:none;-ms-hyphens:none;-webkit-hyphens:none;hyphens:none;"><span><strong>Committed to California:</strong>&nbsp;<strong>Energy for Californians by Californians</strong><br />
California Resource Corporation is em<strong>POWER</strong>ing California with energy through numerous initiatives which not only powers the state but also creates over 5,000 local jobs.&nbsp;<a href="http://linasf/" target="_blank">Examine California&#39;s Energy Independence.</a></spa
@hcharley
hcharley / Share modal in progress.css
Created September 13, 2015 04:18
Share modal in progress.css
label {
font-family: Arial;
font-size: 12px;
float: left;
display: block;
background-color: white;
padding: 4px;
box-sizing: border-box;
background-color: #3C3C3C;
color: #eee;