Skip to content

Instantly share code, notes, and snippets.

View wmealing's full-sized avatar
💭
Take me home, country roads

Wade Mealing wmealing

💭
Take me home, country roads
  • Brisbane
View GitHub Profile
@wmealing
wmealing / compress.erl
Created April 4, 2014 00:49
Simple erlang example of compressing ranges using recursion.
%%%-------------------------------------------------------------------
%%% @author Wade Mealing <>
%%% Created : 2 Apr 2014 by Wade Mealing <>
%%%-------------------------------------------------------------------
-module(compress).
-include_lib("eunit/include/eunit.hrl").
%% user should only use compress/1
-export([compress/1, run_all_tests/0]).
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 25b1ebc..b2d8d56 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -155,11 +155,33 @@ static inline const char *get_task_state(struct task_struct *tsk)
return *p;
}
+static int count_open_files(struct fdtable *fdt)
+{
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 25b1ebc..b2d8d56 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -155,11 +155,33 @@ static inline const char *get_task_state(struct task_struct *tsk)
return *p;
}
+static int count_open_files(struct fdtable *fdt)
+{
@wmealing
wmealing / -
Last active August 29, 2015 14:02
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 25b1ebc..300f52d 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -155,11 +155,27 @@ static inline const char *get_task_state(struct task_struct *tsk)
return *p;
}
+static int count_open_files(struct fdtable *fdt)
+{
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 25b1ebc..3f9de99 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -155,11 +155,27 @@ static inline const char *get_task_state(struct task_struct *tsk)
return *p;
}
+static int count_open_files(struct fdtable *fdt)
+{
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 25b1ebc..300f52d 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -155,11 +155,27 @@ static inline const char *get_task_state(struct task_struct *tsk)
return *p;
}
+static int count_open_files(struct fdtable *fdt)
+{

It may be possible to mitigate by enforcing bash to use privledged mode.

install the bash debuginfo

$ sudo debuginfo-install bash

install systemtap

$ sudo yum install systemtap
@wmealing
wmealing / gist:ece2a08d3077cbe75d45
Last active August 29, 2015 14:07
Using node_package with relx.
Add node_package to rebar.config
{deps, [
....
{node_package, ".*",
{git, "https://github.com/wmealing/node_package.git", {branch, "develop"}}}
]}.
#!/bin/bash
# Fedora dependencies: yum install qrencode caca-utils
# Ubuntu dependencies:
# Example: http://i.imgur.com/o8E0D3k.jpg
TMPFILE=`mktemp`
qrencode -m 1 -s 1 "$1" -o $TMPFILE
FILESIZE="$(file $TMPFILE | cut -d, -f2 | cut -d' ' -f2)"
defmodule Upnpsd do
@inaddr_mcast {239,255,255,250}
@ttl 4
@port 1900
defp setup_socket() do
options = [{:reuseaddr, true}, {:as, :list}]
Socket.UDP.open!(1900, options)
end