Skip to content

Instantly share code, notes, and snippets.

@oneman
oneman / fiddle.css
Last active August 29, 2015 14:23 — forked from zalun/fiddle.css
#logo { margin: 1em; }
#events {
font-family: sans-serif;
box-shadow: 4px 4px 10px 5px grey;
display: flex;
flex-direction: column;
}
#events > .event {
margin: 1em;
margin-top: 0.5em;
[{"status": "approved", "estimated_size": "90", "name": "Lightning Talks + Happy Hour Anniversary", "start_time": "2015-06-19T15:00:00", "member": "jun.wong@hackerdojo.com", "end_time": "2015-06-19T22:00:00", "type": "Meetup", "id": 5319926780788736, "rooms": ["Large Event Room"]}, {"status": "approved", "estimated_size": "10", "name": "Agile Entrepreneurs - Learn by Osmosis from Useful Role Models", "start_time": "2015-06-19T16:00:00", "member": "murali.d@hackerdojo.com", "end_time": "2015-06-19T17:30:00", "type": "Meetup", "id": 5822703906848768, "rooms": ["Conference Room"]}, {"status": "approved", "estimated_size": "50", "name": "Pebble Watch Wearables Hackathon For Kids 6-13", "start_time": "2015-06-20T09:30:00", "member": "emmie.chang@hackerdojo.com", "end_time": "2015-06-20T15:00:00", "type": "Hackathon", "id": 5317102839791616, "rooms": ["Large Event Room"]}, {"status": "approved", "estimated_size": "12", "name": "Ios Workshop ", "start_time": "2015-06-21T09:00:00", "member": "manjula.jonnalagadda@hac
div.ampwin { height: 116px; width: 275px; float: left; margin: 0px; padding: 0px; }
div.ampwin div.amp { position: relative; height: 116px; width: 275px; margin: 0px; padding: 0px; }
div.ampwin div.amp div div { cursor: default; }
div.ampwin div.amp div div div { cursor: default; }
div.ampwin div.amp div { margin: 0px; padding: 0px; }
div.ampwin div.playlist { }
div.ampwin div.playlist div.playlist_actual li { position: relative; white-space: nowrap; overflow: hidden; font-family: Sans;}
typedef enum {
KR_DATA_INT = 1,
KR_DATA_INT = 1,
KR_DATA_INT = 1,
} kr_data_type;
@oneman
oneman / out.diff
Last active August 29, 2015 14:03 — forked from dsheeler/out.diff
diff --git a/lib/ops/server.c b/lib/ops/server.c
index f9a3e2a..a67d6fb 100644
--- a/lib/ops/server.c
+++ b/lib/ops/server.c
@@ -208,19 +208,21 @@ static int add_route(kr_front_router *router, const char *str) {
}
static ssize_t say_something(kr_web_path *path, const char *something) {
+ kr_web_client *client;
kr_http_header hdr;
@oneman
oneman / out.diff
Created June 30, 2014 08:02 — forked from dsheeler/out.diff
diff --git a/daemon/krad_ops.c b/daemon/krad_ops.c
index 2d1068c..74815fd 100644
--- a/daemon/krad_ops.c
+++ b/daemon/krad_ops.c
@@ -37,7 +37,7 @@ typedef struct kr_media_ops_server kr_media_ops_server;
#define KR_COMMAND_SIZE 512
#define KR_OPS_NTASKS 64
-#define KR_TIMEOUT_SEC 1
+#define KR_TIMEOUT_SEC 100
#include <sys/uio.h>
static FILE *launch_pgrep() {
char cmd[512];
snprintf(cmd, 512, "pgrep kr");
cmd[511] = '\0';
return launch_command(cmd);
}
static FILE *launch_stressor() {
/*stress --cpu 4 --vm 4 */
static FILE *launch_pgrep() {
char cmd[512];
snprintf(cmd, 512, "pgrep kr");
cmd[511] = '\0';
return launch_command(cmd);
}
static FILE *launch_stressor() {
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/signalfd.h>
#include <sys/epoll.h>
#include <sys/timerfd.h>
@oneman
oneman / gist:9561870
Last active August 29, 2015 13:57 — forked from dsheeler/gist:9560509
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/signalfd.h>
#include <sys/epoll.h>
#include <sys/timerfd.h>