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 / gist:1b9136dca5327a2cd935c18c06b2fcf0
Created Jun 16, 2019
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
EGreg / gist:14a90c72793aea4e24a9fdb68ef2638b
Last active Jun 16, 2019
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
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.
You can’t perform that action at this time.