Skip to content

Instantly share code, notes, and snippets.

# Activity Information
## Activity entities
The following lists all the entity types and its assocations that are known to the system.
An entity type will be an `actor`, `object` or `target` property of the activity.
Each entity type has a set of `assocations` that will be used by the activity router to figure
out how it should send an activity to the correct activity stream.
* user
/*!
* Base CSS for pdf2htmlEX
* Copyright 2012,2013 Lu Wang <coolwanglu@gmail.com>
* https://github.com/coolwanglu/pdf2htmlEX/blob/master/share/LICENSE
*/#sidebar{position:absolute;top:0;left:0;bottom:0;width:250px;padding:0;margin:0;overflow:auto}#page-container{position:absolute;top:0;left:0;margin:0;padding:0;border:0}@media screen{#sidebar.opened+#page-container{left:250px}#page-container{bottom:0;right:0;overflow:auto}.loading-indicator{display:none}.loading-indicator.active{display:block;position:absolute;width:64px;height:64px;top:50%;left:50%;margin-top:-32px;margin-left:-32px}.loading-indicator img{position:absolute;top:0;left:0;bottom:0;right:0}}@media print{@page{margin:0}html{margin:0}body{margin:0;-webkit-print-color-adjust:exact}#sidebar{display:none}#page-container{width:auto;height:auto;overflow:visible;background-color:transparent}.d{display:none}}.pf{position:relative;background-color:white;overflow:hidden;margin:0;border:0}.pc{position:absolute;border:0;padding:0;margin:0;top:0;left:0
-- (C) 2011 agreeabledragon <recognize@me.com>
on linkinuscmd(cmd)
set AppleScript's text item delimiters to ""
set spotify_active to false
set theString to "/me is not currently running Spotify."
tell application "Finder"
if (get name of every process) contains "Spotify" then set spotify_active to true
end tell
ep_aa_file_menu_toolbar File / Menu style toolbar                                   =johnyma22            2013-12-24 17:50  0.1.1
ep_add_buttons        Add two buttons to Etherpad and make them do something, oh and save the pads content to a file on the server.. =brianherman 2013-07-17 06:18  0.0.21
ep_adminpads          Gives the ability to list and administrate all pads on admin page =spcsser          2013-11-25 11:22  0.0.5
ep_air                Etherpad turned wiki with a minimal style.                    =thgie                2014-01-03 11:47  0.1.1
ep_align              Add Left/Center/Right/Justify to lines of text in a pad       =johnyma22            2013-12-10 23:44  0.0.6
ep_author_hover       Adds author names to span titles (shows on hover), works as authors change their name. Hover includes author color and fast switching between author spans. Hat tip to Martyn York for the initial work on this. =johnyma22 2013-10-06 17:20  0.0.5
ep_author_neat        Neat author display for etherpad-lite    
@simong
simong / gist:8821443
Created February 5, 2014 11:16
OAE OAuth Java
package oaeproject.oauth;
import java.io.ByteArrayInputStream;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.content.InputStreamBody;
@simong
simong / gist:8821437
Last active August 29, 2015 13:56
OAE OAuth Python
from rauth import OAuth2Service
import json
# Setup the OAE service
oae = OAuth2Service(
client_id='cPGS0OS0UtIMM8RFAQq596WbJ8oSXfe1',
client_secret='oAxG0hWqzDafjHmROTVEWdhj8qEpGZMR',
name='Test',
authorize_url='http://cam.oae.com/oauth/authorize',
access_token_url='http://cam.oae.com/api/auth/oauth/v2/token',
<html>
<body>
<table>
<thead>
<th>Name</th>
<th>B</th>
<th>20</th>
<th>19</th>
<th>18</th>
<th>17</th>
$.ajax({
'type': 'POST',
'url': '/api/content/reprocessPreviews',
'data': {
'revision_mime': [
'application/msword',
'application/rdf+xml',
'application/vnd.ms-excel',
'application/vnd.ms-powerpoint',
'application/vnd.oasis.opendocument.presentation',

Cassandra data model

Publications

Contains the publication metadata necessary to generate pretty lists

publicationId displayName type date thumbnailUri publisher linkedContentId
p:abc123 Origin of Species book 123456789 remote:http//... Cambridge null
p:def456 SSTables in practice article 12345789 null NoSQL in the real world c:cam:kljs2341
cqlsh:oae> SELECT * FROM "AuthenticationLoginId" WHERE "loginId" = 'admin:local:administrator';
Request did not complete within rpc_timeout.
Tracing session: 7a96d380-5772-11e3-a8d6-43b9fc51e529
activity | timestamp | source | source_elapsed
----------------------------------------------------------------------------------------------------------+--------------+--------------+----------------
execute_cql3_query | 14:44:54,584 | 10.224.16.81 | 0
Parsing SELECT * FROM "AuthenticationLoginId" WHERE "loginId" = 'admin:local:administrator' LIMIT 10000; | 14:44:54,584 | 10.224.16.81 | 118
Preparing statement | 14:44:54,584 | 10.224.16.81 | 293