Skip to content

Instantly share code, notes, and snippets.

View BinaryMuse's full-sized avatar
🏳️‍🌈
Just gayin' up the place the best I can

Michelle Tilley BinaryMuse

🏳️‍🌈
Just gayin' up the place the best I can
View GitHub Profile
@BinaryMuse
BinaryMuse / index.html
Created November 22, 2018 01:32
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<webview id="foo" src="https://googlechrome.github.io/samples/web-bluetooth/device-info.html?allDevices=true" style="display:inline-flex; width:640px; height:480px"></webview>
<script>
// You can also require other files to run in this process
@BinaryMuse
BinaryMuse / index.html
Created November 20, 2018 00:11
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<div>
@BinaryMuse
BinaryMuse / template.rb
Created November 21, 2010 17:34
My Rails application template - under development! See comments for info.
# ============================================================================
# Info class
# ============================================================================
class ApplicationInfo < Rails::Generators::AppGenerator
attr_reader :notices, :errors, :options, :data
def initialize
@notices = [] # Array of notices to display to the user at the end
@errors = [] # Array of errors to display to the user at the end
@options = [] # Array of options selected throughout the template
048e49afdacdaeabec1d74cd9a2bf9021acf8f8c232d709ac7f78a40dcff3dc9060ff2e84b8e7465fa11b94ddd0b5f572c4e5b15073c42205077bc25a4025777b6 jordemort
@BinaryMuse
BinaryMuse / 00_rvm.sh
Created January 30, 2011 05:17
DND - blog post
# Install RVM and dependencies
sudo aptitude install curl git-core
sudo bash < <( curl -L http://bit.ly/rvm-install-system-wide )
sudo aptitude install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev
sudo adduser `whoami` rvm
echo 'source /usr/local/lib/rvm' >> ~/.bashrc
# Set up users and groups
sudo useradd --home /var/www --create-home --groups rvm unicorn && sudo chmod g+w /var/www
sudo adduser `whoami` unicorn
#
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
body, html {
padding: 0;
margin: 0;
width: 100%;

bump-package-dep

Automatically sets and commits appropriate versions of package dependencies for Atom based on current package.json values.

Example

Here, Atom is bundling tree-view v0.215.3, but we have v0.216.0 as the current version in tree-view's package.json:

$ jq '.packageDependencies."tree-view"' package.json
@BinaryMuse
BinaryMuse / index.js
Created July 23, 2017 03:24
requirebin sketch
const etch = require('etch')
function toHTMLElement(vdom) {
const component = {
update() { /* noop */ },
render () { return vdom }
}
etch.initialize(component)
return component.element
@BinaryMuse
BinaryMuse / quoter.coffee
Created December 1, 2011 06:08
Node.js script for passing in a Blizzard forum post URL and getting the text of the post
# Returns the text in a given forum post.
# Example:
#
# Quoter = require('./quoter.coffee').Quoter
#
# quoter = Quoter.new
# quoter.quote("http://us.battle.net/wow/en/forum/topic/3657277421#2")
http = require 'http'
url = require 'url'
@BinaryMuse
BinaryMuse / README.md
Last active February 1, 2017 00:51
Integrating React with Marionette

Integrating React with Marionette

See ReactComponentView and BackboneModelWatchMixin, below.

Notes

The BackboneModelWatchView could use some additional methods to allow adding/removing watched models after the component is created.