Skip to content

Instantly share code, notes, and snippets.

View srenatus's full-sized avatar
🍍

Stephan Renatus srenatus

🍍
View GitHub Profile
@robballou
robballou / graph.js
Created December 20, 2013 16:27
Step 2: save the graph to a file
require('fs');
require('d3');
var xmldom = require('xmldom');
var dataset = {
apples: [53245, 28479, 19697, 24037, 40245],
};
var width = 460,
height = 300,
@ran488
ran488 / build.gradle
Created April 25, 2014 13:59
Running Fortify from Gradle build. These are the snippets of code you can add to your build.gradle to run the analyzer and spit out a Fortify *.fpr file. Fortify is not F/OSS, so you (your company) will need a license, so the dependencies won't be out in public repo's. You will have to add it to your company's private repo (e.g. Artifactory).
// Add a new configuration
configurations {
fortify { extendsFrom compile }
}
// pull in the fortify libs for the new configuration
dependencies {
fortify 'com.fortify:sourceanalyzer:3.90'
}
@pathawks
pathawks / cdnjs.rake
Created August 9, 2014 13:47
Sync current CDNjs libraries to a YAML file in Jekyll
require 'rubygems'
require 'net/https'
require 'uri'
require 'json'
require 'yaml/store'
require 'jekyll'
desc "Update CDNjs Libraries"
task :updatecdnjs do
site = Jekyll.configuration({})
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential curl zlib1g-dev libgmp3-dev libedit2
# GHC 7.8.3
curl -O http://www.haskell.org/ghc/dist/7.8.3/ghc-7.8.3-x86_64-unknown-linux-deb7.tar.bz2
tar xvfj ghc-7.8.3-x86_64-unknown-linux-deb7.tar.bz2
cd ghc-7.8.3 && ./configure
make install
@pnc
pnc / observer.md
Last active April 1, 2025 21:38
Using Erlang observer/appmon remotely

Using OTP's observer (appmon replacement) remotely

$ ssh remote-host "epmd -names"
epmd: up and running on port 4369 with data:
name some_node at port 58769

Note the running on port for epmd itself and the port of the node you're interested in debugging. Reconnect to the remote host with these ports forwarded:

$ ssh -L 4369:localhost:4369 -L 58769:localhost:58769 remote-host
@TheSeamau5
TheSeamau5 / Button.elm
Created June 14, 2015 23:40 — forked from jinjor/Button.elm
Version using Elm Architecture
import Html exposing (Html)
import Html.Events
import Signal exposing (Address, Signal)
-- Button Component --
type ButtonAction
= Click
| NoOpButton
@mlafeldt
mlafeldt / x.md
Created February 16, 2016 15:48
Providing a Homebrew tap backed by private GitHub repo

First of all, install Homebrew itself.

As the tap is a private Git repo, you need to generate a GitHub token with repo scope and then add this token to your ~/.netrc file like this:

machine github.com
  login <your GitHub user>
  password <your GitHub token>
#require "lambda-term";;
let prompt = LTerm_text.(eval [B_fg (LTerm_style.green); S "# "]);;
UTop.prompt := fst (React.S.create prompt);;
@tsloughter
tsloughter / e.md
Last active November 4, 2016 01:59
Erlang/OTP libraries/modules replaced by third party projects

I'm looking to collect information on why certain functionality found in Erlang/OTP is usually handled instead by a third party library in people's projects.

This could be bugs, missing functionality, poor interface, performance, etc.

Examples off the top of my head that need expanding on are:

  • httpc
  • httpd
  • http_uri
@pr1ntf
pr1ntf / 9front-yabs.sh
Last active September 5, 2023 21:40
Get 9front (Plan9 fork) booted under FreeBSD bhyve
#!/bin/sh
# Yet Another bhyve Script v0.4
# Use this to try and boot 9front, the Plan9 fork.
# Virtio emulation works better (ported drivers)
# PS/2 Mouse emulation requires updated bhyve(8)
# If you don't have it, patch is uploaded with this Gist
# When partitioning, I have had more success with MBR
# GPT may work for some people