Skip to content

Instantly share code, notes, and snippets.

View jeromegn's full-sized avatar
🏠
Rusting it up

Jerome Gravel-Niquet jeromegn

🏠
Rusting it up
View GitHub Profile
@jeromegn
jeromegn / xdp_load_balancer.c
Created October 8, 2019 20:50 — forked from summerwind/xdp_load_balancer.c
XDP based load balancer with L3DSR support
#define KBUILD_MODNAME "load_balancer"
#include <uapi/linux/bpf.h>
#include <linux/in.h>
#include <linux/if_ether.h>
#include <linux/if_packet.h>
#include <linux/if_vlan.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
BPF_HASH(counter, uint32_t, long);
@jeromegn
jeromegn / index.html
Created March 20, 2012 03:02 — forked from benjchristensen/index.html
Animated Line Graphs / Sparklines using SVG Path and d3.js
<html>
<head>
<title>Animated Sparkline using SVG Path and d3.js</title>
<script src="http://mbostock.github.com/d3/d3.js"></script>
<style>
/* tell the SVG path to be a thin blue line without any area fill */
path {
stroke: steelblue;
stroke-width: 1;
fill: none;
up_vote: function(data, callback){
data.type="upvote";
console.log(has_voted, 'has_voted, line 87');
mdb.collection('kudos_bank', function(err, coll){
coll.find({'target_hash':data.target_hash, 'id':data.id}, function(err, cursor){
cursor.toArray(function(err, docs){
console.log(docs);
if (docs.length == 0) {
<%= form_for(@user, :action => "/users/#{@user.login}") %>
<%= hidden_field :value => "DELETE", :name => "_method" %>
<div class="actions">
<input type="image" name="submit" src="/images/btn-delete_user.png" id="deleteUser" />
or <%= link_to "cancel", resource(:users) %>
</div>
<% end =%>