Skip to content

Instantly share code, notes, and snippets.

View tonyskapunk's full-sized avatar
🚀

Tony Garcia tonyskapunk

🚀
View GitHub Profile
Name: HammerDB
Version: 3.3
Release: 1%{?dist}
Summary: HammerDB util
Group: Database
License: GPL
URL: https://hammerdb.com
Source: https://github.com/TPC-Council/%{name}/releases/download/v%{version}/%{name}-%{version}-Linux.tar.gz
Packager: Packager Name
#AutoReqProv: no
@tonyskapunk
tonyskapunk / go.md
Created November 17, 2019 17:08
100daysofcode

100 days of GO code

Topics

  • Environment Setup
  • Hello World
  • File org
    • Go Packages
    • Import Statements
  • Variable Declarations
  • Custom Type Declarations
@tonyskapunk
tonyskapunk / locale_es.md
Created October 23, 2019 22:28
Opsdroid

Created a config file with defaults and added:

logging:
  level: debug
  console: true

lang: es
;;; melancholy-theme.el --- Emacs theme with a dark background.
;; Copyright (C) 2014 , tonyskapunk
;; Author: tonyskapunk
;; https://github.com/tonyskapunk
;; Version: 0.1
;; Package-Requires: ((emacs "24"))
;; Created with emacs-theme-generator, https://github.com/mswift42/theme-creator.
@tonyskapunk
tonyskapunk / h.md
Last active October 22, 2019 16:59
Goodies
  • -(hyphen or minus)
  • –(en dash)
  • —(em dash)
@tonyskapunk
tonyskapunk / notes.md
Created October 9, 2019 17:16
MatterMost

Setup Dev env:

docker \
  run \
  --detach \
  --name mattermost-preview \
  --publish 8065:8065 \
  mattermost/mattermost-preview
@tonyskapunk
tonyskapunk / 20190603-101835.png
Last active June 3, 2019 15:25
Ansible slack
20190603-101835.png
@tonyskapunk
tonyskapunk / notes.md
Created February 2, 2019 04:55
kthresher defaults

Reasons why kthresher does not do "anything" by default.

  • Main purpose is to run it through a cronjob to remove kernels/headers (cadidates for auto-removal)
  • When a configuration is put in place the behavior of kthresher is modified so it achieves what's defined in the config

Examples of the change of behavior running kthresher

  • Without any additional config, will print the help to understand what it does
  • With a config in place will perform that action, e.g. purge kernels

I can easily set a default action, for instance print the available kernels, if any, like what -s does.

@tonyskapunk
tonyskapunk / t.py
Last active January 30, 2019 19:54
LooseVersion
import re
import apt
from json import dumps
from distutils.version import LooseVersion
def cmp_to_key(mycmp):
'Convert a cmp= function into a key= function'
class K:
def __init__(self, obj, *args):
@tonyskapunk
tonyskapunk / bash5.md
Last active January 23, 2019 22:57
test trap on bash5

Create env with docker:

docker run --rm --name buster --tty --detach debian:buster
docker exec buster bash -c 'apt-get update && apt-get install bash -y'
docker exec -ti buster /bin/bash

Create a script with the trap function in it