Skip to content

Instantly share code, notes, and snippets.

@tochiz
tochiz / gist:1098008
Created July 21, 2011 19:39
promenade.c diff file.
diff --git a/promenade.c b/promenade.c
index 7d82a15..e37ed06 100644
--- a/promenade.c
+++ b/promenade.c
@@ -592,8 +594,11 @@ static void dosession(TCMPOOL *mpool){
if(dbputart(tdb, p_id, cols)){
if(*g_updatecmd != '\0' &&
!doupdatecmd(mpool, "comment", p_scripturl, p_user, now, p_id, cols, ocols))
+ {
tclistprintf(emsgs, "The update command was failed.");
@tochiz
tochiz / twitpost.c
Created July 21, 2011 18:24
C code for post to twitter.
//
// twitpost.c
// require liboauth and libtokyocabinet
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <oauth.h>
@tochiz
tochiz / common.c
Created July 20, 2011 04:08
tokyopromenade gist embed patch
diff --git a/common.c b/common.c
index 54f0695..e483fa6 100644
--- a/common.c
+++ b/common.c
@@ -914,6 +914,11 @@ void wikitohtml(TCXSTR *rbuf, const char *str, const char *id, const char *buri,
tcxstrprintf(rbuf, "<div class=\"rule rule_s%d\">"
"<span>----</span></div>\n", lv);
ri++;
+ } else if(tcstrfwm(line, "gist:")){
+ const char *uri;