Skip to content

Instantly share code, notes, and snippets.

View heliostatic's full-sized avatar

Ben Lee-Cohen heliostatic

View GitHub Profile
@manigandham
manigandham / rich-text-html-editors.md
Last active May 3, 2024 19:37
Rich text / HTML editors and frameworks

Strictly Frameworks

Abstracted Editors

These use separate document structures instead of HTML, some are more modular libraries than full editors

@tychay
tychay / 1_install_ansible_20_from_source
Last active September 30, 2016 14:39
Ansible 2.0 with Digital Ocean v2
$ git clone git://github.com/ansible/ansible.git --recursive
$ cd ansible
$ source ./hacking/env-setup
$ sudo pip install paramiko PyYAML Jinja2 httplib2 six
$ make
$ sudo make install
import Ember from 'ember';
export default Ember.Component.extend(KeyHandling, {
setupQuill: Ember.on("didInsertElement", function() {
this.quill = new Quill(this.$('.rich-text-editor__contents').get(0));
this.quill.on("text-change", this.editorChanged.bind(this));
this.quill.on("selection-change", this.selectionChanged.bind(this));
var active = false;
function changeRefer(details) {
if (!active) return;
for (var i = 0; i < details.requestHeaders.length; ++i) {
if (details.requestHeaders[i].name === 'Referer') {
details.requestHeaders[i].value = 'http://www.google.com/';
break;
}
@spence
spence / phantomjs-repl.sh
Last active August 29, 2015 14:19
Bash PhantomJS REPL modeled after https://github.com/sotownsend/BooJS
#!/usr/bin/env bash
### Repl Usage:
#
# $ ./phantomjs-repl.sh
# > missing
# ReferenceError: Can't find variable: missing
# > window
# [object Window]
# > console.log('Hello')
@debergalis
debergalis / gist:bf76084cdb1434d8733d
Last active May 5, 2016 21:42
Notes on Meteor for CS 294-101

Brief notes on Meteor for CS 294-101. Many of the key architectural ideas in Meteor are described at https://www.meteor.com/projects.

  1. BSD as example of great system design. Application primitives: processes run by a scheduler, sockets, sys calls, virtual memory, mbufs. What makes something a platform. Unix vs Multics.

  2. History of application architectures. Mainframes (e.g. IBM 360 / 3270), client-server (e.g. Win32), web (e.g. LAMP), cloud-client. Oscillation of where the software runs. Thin vs thick clients, data vs presentation on the wire. Changes driven by massive forces (cheap CPUs, ubiquitous internet, mobile). New architecture for each era.

  3. What it takes to make modern UI/UX. Mobile. Live updating. Collaboration. No refresh button. All drive the need for “realtime” or “reactive” system. Very different from HTTP era.

  4. Four questions: 1 — how do we move data around; 2 — where does it come from; 3 — where do we put it; 4 — how do we use it?

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@budparr
budparr / jekyll-collections-prev-next.html
Last active September 29, 2021 10:55
Previous Next Links for Jekyll Collections
{% capture the_collection %}{{page.collection}}{% endcapture %}
{% if page.collection %}
{% assign document = site[the_collection] %}
{% endif %}
<h1>TITLE: {{ page.title }}</h1>
{% for links in document %}
{% if links.title == page.title %}
{% unless forloop.first %}
{% assign prevurl = prev.url %}
{% endunless %}
@RyanDawkins
RyanDawkins / rest_controller.rb
Created October 26, 2014 18:26
Generic Ruby REST controller for rails
class RestController < ApplicationController
before_filter :find, :only => [:show, :update, :delete]
def index
@objects = get_class().all
render json: @objects
end
def show
@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active April 21, 2024 03:30
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront