Skip to content

Instantly share code, notes, and snippets.

EGreg / gist:1b9136dca5327a2cd935c18c06b2fcf0
Created June 16, 2019 18:52
Debate: Should the Palestinians govern the whole land?
View gist:1b9136dca5327a2cd935c18c06b2fcf0
MOHAMED: Hello there, Mr. Greg?
GREG: Hey, how's it going?
MOHAMED: The adventurer.
GREG: Exactly. Hey from Brooklyn.
MOHAMED: Hey from Algeria.
EGreg / gist:14a90c72793aea4e24a9fdb68ef2638b
Last active June 16, 2019 18:41
Debate: "Should Palestinians own the whole land"
View gist:14a90c72793aea4e24a9fdb68ef2638b
MOHAMED: Hello there, Mr. Greg?
GREG: Hey, how's it going?
MOHAMED: The adventurer.
GREG: Exactly. Hey from Brooklyn.
MOHAMED: Hey from Algeria.
EGreg / qbix.text
Created January 8, 2018 21:34
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 / rough draft
Created January 4, 2016 20:53
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.
EGreg / FSURLCache.m
Created July 10, 2015 21:45
Intercepting requests on iOS
View FSURLCache.m
#import "FSURLCache.h"
#import <MobileCoreServices/MobileCoreServices.h>
@implementation FSURLCache
- (NSString*) fileMIMEType:(NSString*) file {
NSDictionary *mimeDict = [NSDictionary dictionaryWithObjectsAndKeys:
EGreg / interests.log
Created April 6, 2015 10:49
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:
FROM Groups.users_user
WHERE `id` = 'ohrxqrzb'
EGreg / objectivism
Created March 28, 2015 22:52
Basic question about objectivism
View objectivism
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
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
altruists’ image of a “selfish” brute nor to any man motivated by irrational emotions, feelings, urges, wishes or whims.
well that's not directly applicable, but there's an indication
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 / Location
Created March 16, 2015 16:47
Groups/location Controller
View Location
function Groups_location_response_column($params)
$user = Users::loggedInUser();
if (!$user) {
$miles = array();
foreach (Q_Config::expect('Places', 'nearby', 'miles') as $m) {
EGreg / group.handlebars
Created March 15, 2015 19:44
Group template
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>
EGreg / Q.Promises.js
Created November 11, 2014 22:36
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.