Skip to content

Instantly share code, notes, and snippets.

@tommoor
tommoor / gist:7661602
Last active December 29, 2015 11:09
Node webkit crash report v0.8.1
Process: node-webkit [43157]
Path: /Applications/node-webkit.app/Contents/MacOS/node-webkit
Identifier: com.intel.nw
Version: 30.0.1599.66 (1599.66)
Code Type: X86 (Native)
Parent Process: bash [2069]
User ID: 501
Date/Time: 2013-11-26 16:40:16.749 +0000
OS Version: Mac OS X 10.8.4 (12E3200)
def get_menu(directory)
pages = Dir.glob(Rails.root.join("app/views/docs/api/#{directory}/*.md"))
pages.map do |page|
heading = ''
pages = []
File.open(page, "rb").each do |line|
matches = /^\s?# (.+)/.match(line)
heading = matches[1] if matches
@tommoor
tommoor / gist:5619505
Last active December 17, 2015 13:49
Sqwiggle 0.1.9 Release Notes
Fixed: Focusing the app no longer causes the stream to open
Fixed: Clicking 'copy invite link' in team no longer crashes
Fixed: Shift and UP arrow causing current message to be removed
Fixed: Zebra striping on stream items out when scrolling onto second page of chat
Fixed: Scrolling stream not marking items as read (notification remains)
Fixed: Issue causing right draw to stay closed
Fixed: Improvement of code detection logic causing some messages to be displayed as code
New: Stream now continuously loads more results without needing to click 'load more'
New: Conversation toolbar when on video with mute button. Mute can also be triggered using CTRL+M or command /mute
New: Item in the stream when a conversation has taken place
@tommoor
tommoor / Sqwiggle 0.1.7
Created May 3, 2013 12:30
Sqwiggle 0.1.7 Release Notes
Added: Ability to mute/unmute audio from command line
Added: Desktop notifications when joining a conversation
Added: Display of users email address to team members display
Added: Clicking anywhere on white share area now focuses, focus area was previously very narrow
Change: linking of @mentions and hashtags to twitter removed
Change: Clicking red cross now closes app rather than hiding
Change: Various performance improvements, memory usage, underlying libs
Fixed: Websocket connections now over SSL by default
@tommoor
tommoor / example.html
Created April 11, 2013 19:05
Streams idea
<h1>This gets replaced</h1>
<div class="named true">
This gets shown when condition is met
</div>
<div class="named false">
This gets show otherwise
</div>
// This is a test gist that doesn't do anything
(function(){
alert('why are you running this script?');
})();
@tommoor
tommoor / gist:5183394
Last active December 15, 2015 01:58
How to clone a MediaStream, differences between Chrome 25/26
// works in Chrome 25
try {
this.set({
'stream': stream,
'stream_local': new webkitMediaStream(stream.getAudioTracks(), stream.getVideoTracks())
});
// works in Chrome 26+
} catch(e) {
@tommoor
tommoor / vimeo.json
Last active December 12, 2015 06:59
PageMunch example response for Vimeo URL
{
"videoQuality": "HD",
"embedUrl": "http:\/\/vimeo.com\/moogaloop.swf?clip_id=58893010",
"duration": "PT00H04M45S",
"width": 720,
"height": 1280,
"playerType": "HTML5 Flash",
"encodingFormat": "MP4",
"uploadDate": "2013-02-04T15:08:24+00:00",
"author": {
@tommoor
tommoor / response.json
Last active December 12, 2015 05:58
Example PageMunch response v0.1
{
"url": "http:\/\/www.zvents.com\/palmetto_fl\/events\/show\/306476425-nuovo-brides-bridal-expo",
"type": "Event",
"schema": "http:\/\/schema.org\/Event",
"name": "Nuovo Bride's Bridal EXPO at Bradenton Area Convention Center in Palmetto, FL",
"description": "\n\nNuovo Bride's Bridal EXPO\n\n\n\nSunday, Mar 24 12:00p\nto\n4:00p\n\n\n\nBradenton Area Convention Center\nPalmetto,\nFL\n\n\nVisit with 100+ exhibitors, Stroll through cake galleries, Wedding flower galleries, Photography galleries and more! Sample cakes & menus and find your Dream dress. \n\nEnjoy a Runway Fashion Show with all the top local salons. \n\nRegister for giveaways and prizes! Every bride receives a Free Swag Bag. \n\nFree for Brides & Grooms when you register now!\n\n\n",
"image": "http:\/\/www.zvents.com\/dynamic_images\/5\/4\/2\/7\/28237245_184-50x184-50_5.jpg",
"startDate": "2013-03-24T16:00:00Z",
"location": {
"addressLocality": "Palmetto",
@tommoor
tommoor / cached.php
Last active December 11, 2015 16:39
Wrapping cache methods in CI
<?php
protected function cached($key, $callback, $life)
{
$this->load->driver('cache', array('adapter' => 'memcached'));
if (!$response = $this->cache->get($key)) {
$response = $callback($this);
if ($response) {