Skip to content

Instantly share code, notes, and snippets.

View ccutch's full-sized avatar
🎯
Focusing

Connor McCutcheon ccutch

🎯
Focusing
  • California
View GitHub Profile
@ccutch
ccutch / asdf
Created August 30, 2016 00:33
asdf
asdf
@ccutch
ccutch / README.md
Last active September 25, 2017 21:48
Classable react classes

Was kinda bored and was wondering what HAML link react components would look like

Use this if you want if you make it into a npm package please credit me :D

@ccutch
ccutch / resources.md
Last active October 10, 2017 20:15
Elixir resources
@ccutch
ccutch / elements.spec.js
Created November 7, 2017 08:02
How I would write specification files
import { spec, types, define, abstract, Api } from "spectacles";
spec(module, "elements").ensure("./models/element");
abstract`
This is a module used for elements
`;
// Definitions
define.submodule("constants", "./constants")`
package main
import "fmt"
import "log"
import "encoding/gob"
import "bytes"
type Talkable interface {
Talk()
}
package main
import "fmt"
import "bytes"
import "encoding/gob"
import "encoding/hex"
import "github.com/AsynkronIT/protoactor-go/actor"
type MyActor struct {
CallCount int
package main
import (
"fmt"
"time"
"github.com/AsynkronIT/protoactor-go/actor"
)
func main() {
go template example
@ccutch
ccutch / bindto.js
Last active February 26, 2018 22:54
React component binding to custom html elements. Use `npm install && npm run start` to run
import React from 'react'
import ReactDOM from 'react-dom'
export default (Component, tagname) => {
class Binder extends HTMLElement {
connectedCallback() {
const mountPoint = document.createElement('div');
this.attachShadow({ mode: 'open' }).appendChild(mountPoint);
@ccutch
ccutch / main.rs
Created July 20, 2018 21:48
Mqtt subscriber and publisher in rust
extern crate mqttc;
extern crate netopt;
extern crate ws;
use mqttc::{PubOpt, PubSub};
use std::{thread, time};
static USERNAME: &'static str = "";
static PASSWORD: &'static str = "";