Skip to content

Instantly share code, notes, and snippets.

View fractastical's full-sized avatar

Joel Dietz fractastical

View GitHub Profile
@fractastical
fractastical / gist:e50121495fc1085e403b
Last active August 29, 2015 14:02
[SWARM] How I became a Bitcoin believer

To appreciate why Bitcoin is such a great innovation, you have to understand a great number of different variables, including economics, politics, history, and technology. Although I have a decent background in all of these areas, it took me a long time to appreciate the full genius of Satoshi and potential of Bitcoin. What follows is my own story from skeptic to believer.

My initial appraisal of Bitoin was that it was a fascinating technical innovatoin that would forever be accessible only to a very small segment of the population that salivates over cryptography.

Ironically, it was in the process of creating a startup that in many ways was the polar opposite of Bitcoin that I started to appreciate the core innovations of Bitcoin. My own platform, Evergreen, contained it's own blockchain optimized for high velocity micropayments, with a unit of account weighted to a basket of currencies and commodities. In many senses, it was a reflection of an international monetary system as I would have designed it, fa

@fractastical
fractastical / gist:08f5c233bf55f9668766
Created September 2, 2014 01:32
errors after npm install

npm install

Using worker: worker-linux-8-2.bb.travis-ci.org:travis-linux-12

git.1 1.26s $ git clone --depth=50 --branch=master git://github.com/SwarmCorp/angularfire-seed.git SwarmCorp/angularfire-seed Cloning into 'SwarmCorp/angularfire-seed'... remote: Counting objects: 7335, done. remote: Compressing objects: 100% (5383/5383), done.

@fractastical
fractastical / @ca_peterson SObject initialization from Id.txt
Created May 24, 2011 21:37
@ca_peterson SObject initialization from Id
#
* This method accepts the ID of any object type and returns the full name, including prefix of the sObject
#
* type to which it belongs.
#
* @author cpeterson
#
**/
#
public static Schema.SObjectType getObjectType(id subject){
List<UserFeed> myfeed = [SELECT Id, FeedPostId
FROM UserFeed
WHERE feedpostid = :recipeSixFPostID LIMIT 1];
FeedComment fcomment = new FeedComment();
fcomment.FeedItemId = myfeed.get(0).id;
fcomment.CommentBody = recipeSixComment;
insert fcomment;
recipeSixComment = '';
public List<Recommendation> getRecipeEightTopPosters()
{
List<AggregateResult> results = [
SELECT ParentId pid, Parent.Name pname, COUNT(id) fcount
FROM UserFeed
WHERE Type='UserStatus'
AND CreatedDate = THIS_WEEK
GROUP BY Parent.Name, ParentId
ORDER BY Count(id) DESC LIMIT 10];
public with sharing class RESTController {
public void processRequest(){
validateRequest();
if( HasError )
return;
//Add support for other types of verbs here
processGetQuery();
}
public with sharing class AccountTriggerHandler {
private boolean m_isExecuting = false;
private integer BatchSize = 0;
public AccountTriggerHandler(boolean isExecuting, integer size){
m_isExecuting = isExecuting;
BatchSize = size;
}
trigger AccountTrigger on Account (after delete, after insert, after undelete,
after update, before delete, before insert, before update) {
AccountTriggerHandler handler = new AccountTriggerHandler(Trigger.isExecuting, Trigger.size);
if(Trigger.isInsert && Trigger.isBefore){
handler.OnBeforeInsert(Trigger.new);
}
else if(Trigger.isInsert && Trigger.isAfter){
handler.OnAfterInsert(Trigger.new);
AccountTriggerHandler.OnAfterInsertAsync(Trigger.newMap.keySet());
class ChatPostWrapper {
Chat_Session__Feed post;
public String postBody { get; set; }
public String userHandle { get; set; }
public String createdDate { get; set; }
public Boolean newPost { get; set; }
public Boolean systemMessage { get; private set; }
public List<FeedComment> comments { get; set; }
public with sharing class TaskWrapper {
public Boolean markedComplete { get; set; }
public Boolean markedIncomplete { get; set; }
public Boolean markedReviewed { get; set; }
public Boolean created { get; set; }
public String assignedTo { get; set; }
//public Boolean markedReviewedIncomplete { get; set; }
public NewsFeed taskFeedItem { get; set; }
public Integer commentCount { get; set; }