Skip to content

Instantly share code, notes, and snippets.

View robertcedwards's full-sized avatar
🖼️
Framing

Robert C Edwards robertcedwards

🖼️
Framing
View GitHub Profile
@NickDiMucci
NickDiMucci / BasicEntityCollision.cs
Last active May 16, 2021 06:54
Basic collision detection via ray casting in Unity.
public class BasicEntityCollision : IEntityCollision {
private Vector3 size;
private Vector3 center;
// Give a bit of space between the raycast and boxCollider to prevent ray going through collision layer.
private float skin = .005f;
private LayerMask collisionMask;
private LayerMask playerMask;
public bool OnGround { get; set; }
@lg
lg / cloudy-gamer-launcher.sh
Last active April 28, 2021 14:25
Easily start/stop Paperspace and Parsec instances
#!/bin/bash
#
# CloudyGamerLauncher by Larry Gadea
# Easily start/stop Paperspace and Parsec instances
#
# Make sure to fill out the variables below. For the machine id, use the
# 8-letter identifier for the machine on Paperspace (ex. PS8RGDUY)
#
# Note: Requires Paperspace API key (generate one in account settings)
@murtaugh
murtaugh / 1. single-line.html
Last active April 21, 2021 16:23
Blockquote patterns for ALA
<figure class="quote">
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote>
</figure>
@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@hardillb
hardillb / wemo-control.js
Last active December 13, 2020 15:34
Wemo lights example - "npm install wemo-js xml2js" then "node wemo-contol.js" for instructions
var wemo = require('wemo-js');
var http = require('http');
var util = require('util');
var xml2js = require('xml2js');
var postbodyheader = [
'<?xml version="1.0" encoding="utf-8"?>',
'<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">',
'<s:Body>'].join('\n');
@jconnoll
jconnoll / gist:1215643
Created September 14, 2011 01:29
Shopify - Get Count of Products in Collection from Linklist
{% for link in linklists.clothing.links %}
{% paginate link.object.products by 9999 %}
COUNT: {{ link.object.all_products_count }} <br>
{% endpaginate %}
{% endfor %}
@fastdivision
fastdivision / author.html
Last active September 3, 2020 20:09
Jekyll Examples
<div class="byline author vcard">
<a class="photo" href="{% render_author url %}">
<img src="{% render_author avatar %}" alt="{{ page.author }}" title="{{ page.author }}">
</a>
<h2>{{ page.author }}</h2>
<div class="author-bio">
<p>{% render_author bio %}</p>
</div>
</div>
@southwolf
southwolf / Pebble.ino
Last active January 26, 2020 20:40
Arduino code for Communicate with Pebble
#include <string.h>
#include <ctype.h>
#include <SoftwareSerial.h>
// the Bluetooth Shield connects to Pin D9 & D10
SoftwareSerial bt(9,10);
const uint8_t req[5] = {0x00, 0x01, 0x00, 0x11, 0x00};
const uint8_t cap[17] = {0x00, 0x0d, 0x00, 0x11, 0x01, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32};
const uint8_t ping[9] = {0x00, 0x05, 0x07, 0xd1, 0x00, 0xde, 0xad, 0xbe, 0xef};
@damienalexandre
damienalexandre / PrismCarpet.ino
Last active November 7, 2019 17:46
Arduino code making an HTTP request to Google Analytics and returning the status code. Replace `YOURGAID-HERE` by your GA tag.
#include <SPI.h>
#include <Ethernet.h>
// Thx http://bildr.org/2012/11/force-sensitive-resistor-arduino/
// Make use of https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
// MAC Address, needed by the Ethernet Shield
byte mac[] = { 0xB0, 0xC0, 0xDE, 0xEF, 0xFE, 0xC7 };
int pin_red = 7; // Red LED
@oandrienko
oandrienko / measure.py
Last active July 26, 2019 18:21
An image processing script for measurments
#!/usr/bin/env python
#title :measure.py
#description :An image processing script for measurments
#author :Oles Andrienko, Adrian Rosebrock
#date :20161110
#version :0.1
#usage :python measure.py [-l] <reference_length>
#python_version :2.7.12
#==============================================================================