Skip to content

Instantly share code, notes, and snippets.

@mmirolim
mmirolim / list.c
Created August 9, 2019 21:26 — forked from icheishvili/list.c
Linked List in C with Iterator
struct list_node {
void* data;
struct list_node* next;
};
struct list {
struct list_node* head;
};
struct list* list_create() {
@mmirolim
mmirolim / cloud_metadata.txt
Created June 25, 2019 21:07 — forked from jhaddix/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## AWS
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
@mmirolim
mmirolim / Bulletproof_foods.md
Created November 5, 2017 11:57 — forked from JamesDullaghan/Bulletproof_foods.md
Dave Aspreys bulletproof diet food list

How many servings should I eat per day?

  • Fruit = 1-2 servings
  • Animal protein = 4 - 6 servings
  • Healthy fats = 5 - 9 servings
  • Healthy vegetables = 6 - 11 servings

How should I allocate my calories per day?

  • Healthy fats = 50%
@mmirolim
mmirolim / ants.clj
Created October 27, 2016 14:44 — forked from michiakig/ants.clj
Clojure ant sim from Rich Hickey
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
;dimensions of square world
@mmirolim
mmirolim / autovpn.py
Created October 6, 2016 12:03 — forked from domenkozar/autovpn.py
AutoVPN for NetworkManager
#!/usr/bin/env python
"""
Copyright 2011 Domen Kozar. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Command caption reads an audio file and outputs the transcript for it.
package main
import (
"fmt"
"io"
@mmirolim
mmirolim / predicting_customer_behav_1.R
Created January 29, 2016 07:44 — forked from mattbaggott/predicting_customer_behav_1.R
Uses the BTYD package and Pareto/NBD model to predict customer behavior in R Slides are at: http://www.slideshare.net/mattbagg/baggott-predict-customerinrpart1#
#
# PREDICTING LONG TERM CUSTOMER VALUE WITH BTYD PACKAGE
# Pareto/NBD (negative binomial distribution) modeling of
# repeat-buying behavior in a noncontractual setting
#
# Matthew Baggott, [email protected]
#
# Accompanying slides at:
# http://www.slideshare.net/mattbagg/baggott-predict-customerinrpart1#
#
@mmirolim
mmirolim / example.go
Created November 8, 2015 13:47 — forked from heatxsink/glog-example.go
An example of how to use golang/glog.
/*
glog-example
------------
background
---
You probably want to read the source code comments at the top of the glog.go file in
the golang/glog repository on github.com. Located here: https://github.com/golang/glog/blob/master/glog.go
setup
@mmirolim
mmirolim / index.gohtml
Last active August 28, 2015 06:11 — forked from ericlagergren/index.gohtml
Hot-reloading / hot-swapping live template files in Go
My name is {{.Name}} and I'm {{.Age}} years old!!
@mmirolim
mmirolim / gist:509fa3cc0ef8aa6b05f5
Last active August 29, 2015 14:26 — forked from mcastilho/gist:e051898d129b44e2f502
Cheap MapReduce in Go
package main
import (
"bufio"
"encoding/csv"
"encoding/json"
"fmt"
"io"
"os"
"path/filepath"