Skip to content

Instantly share code, notes, and snippets.

View rchrd2's full-sized avatar

Richard Caceres rchrd2

View GitHub Profile

Participants should have a recent version of Node.js installed on their system (preferably the latest LTS version, which is 6.9.1 as of this writing—but anything from 0.10 on should work). Participants should clone the following repositories and run npm install in each of them prior to the start of the workshop.

Optional: It might be helpful to install Electron globally so that you can use it from the command line in case there are any issues with any of the dependencies in the project above. You can install this through npm install -g electron.

Finally, debugging the main process is easiest using Visual Studio Code, which is available for all platforms (Windows, Linux, and macOS). This is not a hard requirement, but helpful if you'd like to follow along for that small segment of the workshop.

@jongacnik
jongacnik / package.json
Created July 1, 2016 17:37
budo react
{
"name": "folder2k16",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "budo index.js --live --pushstate -- -t [ babelify --presets [ react es2015 ] ]"
},
"author": "",
"license": "ISC",
@neutronstein
neutronstein / share_text_attach_ace.js
Last active April 23, 2016 03:59 — forked from geakstr/share_text_attach_ace.js
Ace editor (v1.2.3) and ShareJS (v0.7.40) text adapter
function attachAce(editor, doc) {
if (!doc.provides.text) {
throw new Error("Cannot attach ace to non-text share document");
}
let suppress = false;
editor.setValue(doc.getSnapshot() || "");
check();
const newline = editor.session.getDocument().getNewLineCharacter();
@qtrandev
qtrandev / Polymer
Last active November 6, 2015 04:02
Polymer 1.0 snippets and notes from Polycasts YouTube videos
Info:
=====
These snippets help me remember how to use Polymer syntax. Many come from the Polycasts YouTube videos.
Message me @qtrandev in the Polymer Slack or email qtrandev@gmail.com and I'll message you links I know.
Getting started:
================
bower init
bower install --save Polymer/polymer#^1.0.0
@robdodson
robdodson / index.html
Created July 10, 2015 21:19
poly-storage
<!DOCTYPE html>
<html>
<head>
<!-- Web Components -->
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="bower_components/polymer/polymer.html">
<link rel="import" href="bower_components/iron-localstorage/iron-localstorage.html">
</head>
<body unresolved>
@rchrd2
rchrd2 / Toaster_AI_v2.c
Last active April 12, 2023 17:34
Toaster_AI_v2.pd
// Toaster AI v2
// by Richard Caceres
// 11/12/09
//
// Safety Precautions that could be put in place
// Overheating
// Description: Precautions to prevent the toaster from being on too long.
// Status: A solution is put in place where the toaster can only be on N seconds at a time.
// There is also a cool down period.
//
@jeremydw
jeremydw / gist:bc901de8b7e59cbeb190
Created February 27, 2015 02:06
Python webapp2 application that serves files behind HTTP Basic Auth
import webapp2
import mimetypes
import os
import time
from datetime import datetime
import base64
_here = os.path.dirname(__file__)
USERNAME = 'foo'
@NotSqrt
NotSqrt / settings_test_snippet.py
Last active May 1, 2022 01:34 — forked from nealtodd/settings_test_snippet.py
Another shot at this problem ..
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
return "notmigrations"
MIGRATION_MODULES = DisableMigrations()
def nearby_spots_old(request, lat, lng, radius=5000, limit=50):
"""
WITHOUT use of any external library, using raw MySQL and Haversine Formula
http://en.wikipedia.org/wiki/Haversine_formula
"""
radius = float(radius) / 1000.0
query = """SELECT id, (6367*acos(cos(radians(%2f))
*cos(radians(latitude))*cos(radians(longitude)-radians(%2f))
+sin(radians(%2f))*sin(radians(latitude))))
@rayfranco
rayfranco / README.md
Created April 7, 2014 23:42
Convert YML to JSON with gulp

Convert YML to JS with gulp

This was a very straightforward workaround I used in a project to get things done while the assemble team is working on some serious converter gulp-convert.