Skip to content

Instantly share code, notes, and snippets.

Gregory Magarshak EGreg

Block or report user

Report or block EGreg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@EGreg
EGreg / qbix.text
Created Jan 8, 2018
Qbix Platform presentation - exact script for voiceover. One paragraph per slide.
View qbix.text
The social platforms we use today are all centralized. Whether it's Facebook, Twitter, Uber, or any of a dozen others, both people and organizations have come to rely on giant monolithic platforms to connect them, mediate their interactions, and trust them with their data, identity and brand.
It starts simply enough. A few smart entrepreneurs build a useful platform. They their first users, and pretty soon it becomes clear this platform is the next big thing. Investors start putting in money, as more and more people around the world join the centralized platform. Now, third party developers are invited to build apps on top of it, adding even more value to the community.
The problem is that it's all centralized. One company controls all the interactions. People build their social identity on its domain. Companies host their brand identity there too. Developers get API keys to build atop the platform. At any time, the platform could delete an account, shut down a community, or revoke API keys of a developer.
@EGreg
EGreg / rough draft
Created Jan 4, 2016
khamenei response
View rough draft
How and why #EveryHumanBeing who grew up in a country should be offered equal rights to all other citizens of that country.
<ol>
<tr>
<td>
Questions
</td>
<td>
@EGreg
EGreg / FSURLCache.m
Created Jul 10, 2015
Intercepting requests on iOS
View FSURLCache.m
#import "FSURLCache.h"
#import <MobileCoreServices/MobileCoreServices.h>
@implementation FSURLCache
- (NSString*) fileMIMEType:(NSString*) file {
NSDictionary *mimeDict = [NSDictionary dictionaryWithObjectsAndKeys:
@"image/png",
@"png",
@EGreg
EGreg / interests.log
Created Apr 6, 2015
Adding and removing interests
View interests.log
-----
[2015-04-03 11:16:10] (gmba.local) Groups: DELETE slots: (publisherId,streamName) from url: http://gmba.local/Groups/action.php/Streams/interest?Q.ajax=json&Q.slotNames=publisherId%2CstreamName&Q.method=DELETE&Q.nonce=d454a3454f9a29f2cf2c18d376183325
[2015-04-03 11:16:10] (gmba.local) Groups:
SELECT *
FROM Groups.users_user
WHERE `id` = 'ohrxqrzb'
LIMIT 1
@EGreg
EGreg / objectivism
Created Mar 28, 2015
Basic question about objectivism
View objectivism
srogers
you cannot possibly expect to have a discussion about whether Objectivism is consistent with “screwing people over” if you hold that man’s nature is subjective
mgin
The Objectivist ethics holds that the actor must always be the beneficiary of his action and that man must act for his own rational self-interest. But his right to do so is derived from his nature as man and from the function of moral values in human life—and, therefore, is applicable only in the context of a rational, objectively demonstrated and validated code of moral principles which define and determine his actual self-interest. It is not a licens
mgin
altruists’ image of a “selfish” brute nor to any man motivated by irrational emotions, feelings, urges, wishes or whims.
mgin
well that's not directly applicable, but there's an indication
srogers
While you may have read a lot of stuff, you clearly disagree with most of it, in various ways that are more fundamental than ethics
@EGreg
EGreg / Location
Created Mar 16, 2015
Groups/location Controller
View Location
<?php
function Groups_location_response_column($params)
{
$user = Users::loggedInUser();
if (!$user) {
Q_Response::redirect("Groups/groups");
}
$miles = array();
foreach (Q_Config::expect('Places', 'nearby', 'miles') as $m) {
View group.handlebars
{{&tool "Streams/participants" "group" max=10 maxShow=10 showSummary=false showControls=true showBlanks=true }}
<div class="Q_big_prompt Groups_going_prompt">
Are you in?
<span class="Groups_going" data-going="{{going}}">
<span data-going="no" class="Groups_no {{no}}">No
</span><span data-going="maybe" class="Groups_maybe {{maybe}}">Maybe
</span><span data-going="yes" class="Groups_yes {{yes}}">Yes</span>
</span>
</div>
@EGreg
EGreg / Q.Promises.js
Created Nov 11, 2014
A clear and tested Promises implementation
View Q.Promises.js
/**
* Q Promises implementation
* @module Q
*/
(function (Q) {
/**
* Q.Promise constructor.
* Call the .fulfill(...) or .reject(...) method to
* signal that the promise is fulfilled or rejected.
@EGreg
EGreg / Q.normalize
Created Aug 13, 2014
Here is Q.normalize
View Q.normalize
/**
* Normalizes text by converting it to lower case, and
* replacing all non-accepted characters with underscores.
*
* @static
* @method normalize
* @param {String} text
* The text to normalize
* @param {String} replacement
* Defaults to '_'. A string to replace one or more unacceptable characters.
@EGreg
EGreg / chat-messages.js
Last active Aug 29, 2015
Please implement something like this
View chat-messages.js
function loadMoreStuff(callback, options) {
// standard options stuff
var o = Q.extend({
max: -1,
limit: 10
}, loadMoreStuff.options, options);
// use streams api
Q.Message.get(publisherId, streamName, o,
You can’t perform that action at this time.