Skip to content

Instantly share code, notes, and snippets.

View Harvie's full-sized avatar
🎯
Focusing

Tomas Mudrunka Harvie

🎯
Focusing
View GitHub Profile
@DanGe42
DanGe42 / context_demo.c
Created October 25, 2013 03:14
A non-trivial example of how to use user contexts for trivial scheduling.
#include <ucontext.h>
#include <sys/types.h>
#include <sys/time.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <poll.h>
/* ucontext sample program
@Kilian
Kilian / annoying.js
Created January 6, 2011 15:04
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*