Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View DaneTheory's full-sized avatar
🏠
Working from home

Branden Dane DaneTheory

🏠
Working from home
View GitHub Profile
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@DaneTheory
DaneTheory / PHPSnips.php
Last active June 2, 2016 13:03
Code snipz. Includes PHP, Python, BASH, and a few other goodies I've created.
<?php
/* This Snips file is all about showing some PHP love!
-------------------------------------------------------------
Unfortunately, due to previous contract stipulations I don't
have access to much of the PHP I've written over the years.
This file contains a few snips I was able to get a hold of and
are based around CMS devlopment */
?>
@DaneTheory
DaneTheory / S3-Bucket-Auth-Lamda-Func
Last active December 20, 2017 06:14
S3 Bucket Auth Lamda Func Cloudfront config function
let plainTextEmailAddress = null
let cloudFrontPrivateKey = null
const KMS = require('aws-sdk/clients/kms')
const kms = new KMS({apiVersion: '2014-11-01'}) // <==== TODO: CHECK TO SEE IF apiVersion is correct!!!!!!!!!!!!
const crypto = require('crypto')
const headers = {
"Content-Type": "application/json",
"Access-Control-Allow-Headers": "Content-Type",
"Access-Control-Allow-Methods": "OPTIONS,POST",
@DaneTheory
DaneTheory / static_server.js
Created June 8, 2018 01:38 — forked from amejiarosario/static_server.js
Node.js quick file server (static files over HTTP) using es6+
const http = require('http');
const url = require('url');
const fs = require('fs');
const path = require('path');
const port = process.argv[2] || 9000;
http.createServer(function (req, res) {
console.log(`${req.method} ${req.url}`);
// parse URL
@DaneTheory
DaneTheory / packages.json
Last active February 9, 2019 04:46
Atom Sync-Settings Package Config Storage
// TODO
@DaneTheory
DaneTheory / .hyper.js
Last active April 3, 2019 13:31
Auto Sync My Hyper Settings
// -- hyper-stylesheet-hash:128569e017c92721d52dee4a814c9cf1 --
/* =================================
GLOBAL HYPER CONFIGS
- Ref: https://hyper.is#cfg
==================================== */
module.exports = {
config: {
@DaneTheory
DaneTheory / Navigation Bar by Jan Kaděra.markdown
Created February 17, 2016 05:59
Navigation Bar by Jan Kaděra
@DaneTheory
DaneTheory / campfire-3december-day-9.markdown
Created August 12, 2019 02:55
Campfire 🔥 (#3December - Day 9)

Campfire 🔥 (#3December - Day 9)

Another warm winter scene to help me experiment with lighting, shadows and 3D within THREE.js

As @davidkpiano pointed out, if you leave this open long enough, your laptop will get warmer too. I'm calling that a feature

A Pen by Shaw on CodePen.

License.

// public