Skip to content

Instantly share code, notes, and snippets.

View marcinantkiewicz's full-sized avatar

Marcin Antkiewicz marcinantkiewicz

View GitHub Profile
@marcinantkiewicz
marcinantkiewicz / Bluetooth_references.md
Last active June 14, 2018 10:15
Resources for bluetooth monitoring (ubertooth)
* cofnig origin ref: http://serverfault.com/questions/235669/how-do-i-make-rabbitmq-listen-only-to-localhost
Bugs:
* epmd stays up after rabbitmq-server is stopped. It's shared amond all Erlang instances, so maintainers feel not one packake should kill it.
https://bugzilla.redhat.com/show_bug.cgi?id=1104843
* Erlang has a bug requiring ERL_EPMD_ADDRESS to be specified as IPv6. It seems that, if epmd is built with ipv6, it looses ability to bind with ipv4. Fix traversing from upstream.
https://bugs.launchpad.net/ubuntu/+source/erlang/+bug/1374109
https://github.com/erlang/otp/compare/maint...msantos:epmd-IPv6-node-reg
We run R16B03-1/3.2.4-1
@marcinantkiewicz
marcinantkiewicz / README.md
Created September 12, 2018 15:25 — forked from joyrexus/README.md
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")

Note, a lot of content here is from SIRA lists/posts. If you are interested in the topic, please join SIRA.

TODO

  • Group items in a sane way.
  • The papers probably should be listed in a quotable format of some standard. Same with books?
  • This list grew a bit big, probably should be split into separate lists per category. I started listing by person, but it probably makes no sense.
  • The books and podcasts are the only lists that I think are substantial. The rest is not even stubs.

Books

Some of the books are available used on Ebay, for a fraction of the Amazon price.

//will miss cookies with httpOnly attribute set
function printCookie(match){
var cookies = document.cookie.split(";");
var cookie = {};
for (var i=0; i<cookies.length; i++){
header = cookies[i].trim();
marker = header.indexOf("=");
name = header.substr(0,marker);
value = header.substr(marker+1);
@marcinantkiewicz
marcinantkiewicz / 99-redirect-to-unifi.conf
Created February 18, 2021 17:29
lighttpd: redirect default ports to the unifi controller
# tls has to be enabled on :443 so that the connection can be terminated there before the redirect is sent back.
$SERVER["socket"] == ":80" {
$HTTP["host"] =~ ".*" {
url.redirect = (""=>"https://%0:8443/manage/site/default/dashboard")
}
}
$SERVER["socket"] == ":443" {
$HTTP["host"] =~ ".*" {
def get_detects():
# other parameters: for pagination: limit (max on page) and offset, and for ordering: sort. I want detections from last 5min.
parameters = {"filter":"last_behavior:>'now-5m'"}
d = detects.Detects(creds={ 'client_id': cid,'client_secret': key})
response = d.QueryDetects(parameters)
if response:
if response['body']['meta']['pagination']['total'] > 0:
return response['body']['resources']
else:
# https://gist.github.com/marcinantkiewicz/9ac20677145f246eb01cd1759cb03f35
# Author: Marcin Antkiewicz
# marcin@kajtek.org
# @deciban
# Use:
#find_chrome_extensions -OutputDir "c:\"
#idea ref: https://www.reddit.com/r/PowerShell/comments/5px71w/getting_chrome_extensions/
#PS 2.o has no convertfrom-json, 2.0 helper from http://stackoverflow.com/questions/28077854/powershell-2-0-convertfrom-json-and-convertto-json-implementation
// userscript parts to pause playback in all open tabs, save for the current one.
// handles http video and audio tags, this will pause what is playing.
// Swap pause() to play() to reverse. Other controls:
// .volume (goes on interval from 0-1.0)
// .muted (bool)
['video','audio'].forEach((tag)=>{
player = document.getElementsByTagName(tag)
if(!![...player].find((e)=>e && !(e.paused && e.ended && e.muted))){
function _gitlog_list_committers () {
DAYS=${1:-1}; # check last day unless more requested
git log --pretty=format:'%<(20)%cn %ce' \ # committer name and email
--after=$(date -v "-${DAYS}d" +%F) \ # in the past DAYS
--invert-grep --committer='GitHub' \ # just people, no bots
--all | \ # all branches
sort -u ;
}