Skip to content

Instantly share code, notes, and snippets.

View but3k4's full-sized avatar

Claudio Borges but3k4

  • Workday
  • Ireland
View GitHub Profile
#!/usr/bin/ruby
#
require 'optparse'
require 'open-uri'
require 'openssl'
require 'json'
uri = 'http://www.macvendorlookup.com/api/v2'
mac_address = nil
@but3k4
but3k4 / debian_wheezy.cfg
Created September 20, 2015 13:25
Debian Wheezy Preseed Snippet
### Partitioning
#
d-i partman/early_command \
string debconf-set partman-auto/disk "\$(list-devices disk | head -n1)"
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-auto-lvm/new_vg_name string VolGroup00
@but3k4
but3k4 / functions.lua
Created September 4, 2015 11:34
Lua functions
-- -*- coding: utf-8 -*-
--
local M = {}
function M.readfile(file)
local conf = {}
local fp = io.open(file, "r")
if fp == nil then
@but3k4
but3k4 / edbot.lua
Last active September 4, 2015 11:31
edbot module for yagop/telegram-bot
local http = require("socket.http")
local string = require("string")
local ltn12 = require ("ltn12")
local funcs = (loadfile "./libs/functions.lua")()
local function edbot(msg)
local params = {
['server'] = '0.0.0.0:8085',
['charset_post'] = "utf-8",