Skip to content

Instantly share code, notes, and snippets.

@EGreg
EGreg / gist:1b9136dca5327a2cd935c18c06b2fcf0
Created June 16, 2019 18:52
Debate: Should the Palestinians govern the whole land?
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 June 16, 2019 18:41
Debate: "Should Palestinians own the whole land"
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 January 8, 2018 21:34
Qbix Platform presentation - exact script for voiceover. One paragraph per slide.
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 January 4, 2016 20:53
khamenei response
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 / Mysql.php
Created April 23, 2013 22:58
testing
<?php
/**
* @module Db
*/
class Db_Mysql implements iDb
{
/**
* This class lets you create and use PDO database connections.
[root@li226-103 Q]$ hg strip 2970
saved backup bundle to /live/Q/.hg/strip-backup/d81bd91d5db2-backup.hg
Started to generate API documentation
[root@li226-103 Q]$ hg log | head
2970[tip]:2967,2969 3c779bf0f46f 2013-03-21 10:25 -0400 gregory
merged develop - hopefully this will fix the bugs
2969 417d2a852997 2013-03-21 04:28 +0400 dmitriy
Removed 'behavior' css3pie property from css rules and made separate UI-ie.css files with that 'behavior' property.
live server:
> hg pull
> hg branch
default
> hg merge develop
36 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
> hg ci -m "merged develop - should fix the bugs"
created new head (!?)
@EGreg
EGreg / examples.txt
Last active December 11, 2015 22:58
Examples of how to use Q
SERVER SIDE:
========================= classes/Chess.php =====================
// MODEL ON SERVER
class Chess extends Base_Chess // here's one particular table
{
function makeMove($e)
{
@EGreg
EGreg / gist:4602842
Created January 23, 2013 07:26
Creates mixins and classes in JS
/**
* Mixes in one or more classes. Useful for inheritance and multiple inheritance.
* @param A Function
* The constructor corresponding to the "class" we are mixing functionality into
* This function will get the following members set:
* __mixins: an array of [B, C, ...]
* constructors(subject, params): a method to call the constructor of all mixing classes, in order. Pass this to it.
* staticProperty(property): a method for getting a property name
* @param B Function
* One or more constructors representing "classes" to mix functionality from
@EGreg
EGreg / DRY
Created January 25, 2012 20:13 — forked from fennb/gist:1124579
Asynchronous cache failover example
// asynchronous version
asynchronousCache.get("id:3244", function(err, myThing) {
if (myThing == null) {
asynchronousDB.query("SELECT * from something WHERE id = 3244", function(err, myThing) {
// We now have a thing from DB, do something with result
doSomething(myThing);
});
} else {
// We have a thing from cache, do something with result