THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
/* | |
author: jbenet | |
os x, compile with: gcc -o testo test.c | |
linux, compile with: gcc -o testo test.c -lrt | |
*/ | |
#include <time.h> | |
#include <sys/time.h> | |
#include <stdio.h> |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
library(inline) | |
inc <- ' | |
/* This is taken from envir.c in the R 2.15.1 source | |
https://github.com/SurajGupta/r-source/blob/master/src/main/envir.c | |
*/ | |
#define FRAME_LOCK_MASK (1<<14) | |
#define FRAME_IS_LOCKED(e) (ENVFLAGS(e) & FRAME_LOCK_MASK) | |
#define UNLOCK_FRAME(e) SET_ENVFLAGS(e, ENVFLAGS(e) & (~ FRAME_LOCK_MASK)) | |
' |
#!/bin/sh | |
# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $ | |
# This script starts an instance of Xvfb, the "fake" X server, runs a command | |
# with that server available, and kills the X server when done. The return | |
# value of the command becomes the return value of this script, except in cases | |
# where this script encounters an error. | |
# | |
# If anyone is using this to build a Debian package, make sure the package |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <uv.h> | |
#include <curl/curl.h> | |
uv_loop_t *loop; | |
CURLM *curl_handle; | |
uv_timer_t timeout; | |
typedef struct curl_context_s { |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
One of the many things I do for my group at work is to take care of automating as many things as possible. It usually brings me a lot of satisfaction, mostly because I get a kick out of making people's lives easier.
But sometimes, maybe too often, I end up in drawn-out struggles with machines and programs. And sometimes, these struggles bring me to the edge of despair, so much so that I regularly consider living on a computer-less island growing vegetables for a living.
This is the story of how I had to install Pandoc in a CentOS 6 Docker container. But more generally, this is the story of how I think computing is inherently broken, how programmers (myself included) tend to think that their way is the way, how we're ultimately replicating what most of us think is wrong with society, building upon layers and layers of (best-case scenario) obscure and/or weak foundations.
*I would like to extend my gratitude to Google, StackOverflow, GitHub issues but mostly, the people who make the
First, please read On Maintaining a Native Node Module
Problem: There is no standard way to build + distribute prebuilt binaries for node modules with native addons (e.g. C++ bindings).
There's a thing called NODE_MODULE_VERSION
which is used to know if a native module was compiled for the correct version + flavor of node. If you are trying to load something compiled for e.g. iojs
from February 2015 into node
from March 2014 you will get an error something like Error: Module version mismatch. Expected 11, got 42.
when you try and run your program. node
uses numbers from 10 going up, and iojs
uses numbers from 40 going up. The NODE_MODULE_VERSION
gets bumped usually when V8 is upgraded, but sometimes for other reasons. It also gets even more complicated when you start talking about runtimes like Electron or Node-Webkit, but I won't get into that here. To my knowledge there is n
Forked this gist that contained Andrie de Vrie' code from Creating network graphs using javascript directly from R. I thought it would be a good opportunity to explore some other network visualization htmlwidgets
.
All the code is within this Gist for maximum reporducibility.
library(jsonlite) | |
## Download | |
pkgs <- fromJSON("http://crandb.r-pkg.org/-/events") | |
## Filter | |
na_pkgs <- unique(pkgs$name[ is.na(pkgs$date) ]) | |
events <- pkgs[ ! pkgs$name %in% na_pkgs, c("date", "name", "event")] |