Skip to content

Instantly share code, notes, and snippets.

View mpolinowski's full-sized avatar
👉
[object Object]

Mike Polinowski mpolinowski

👉
[object Object]
View GitHub Profile
@mpolinowski
mpolinowski / vBulletin5_SQL.txt
Last active November 5, 2019 04:04
vBulletin5 SQL tables
MariaDB [vb5]> show tables;
+-----------------------------------+
| Tables_in_vb5 |
+-----------------------------------+
| Firmware |
| Firmware_Rechte |
| ad |
| adcriteria |
| adminhelp |
| administrator |
@mpolinowski
mpolinowski / import_script_log.txt
Last active November 5, 2019 03:33
Log for the vBulletin Import Script for Discourse
su discourse -c 'bundle exec ruby script/import_scripts/instarvb5.rb'
Loading existing groups...
Loading existing users...
Loading existing categories...
Loading existing posts...
Loading existing topics...
importing groups... 17 / 17 (100.0%) [2707941 items/min]
importing users
20180 / 20180 (100.0%) [706239 items/min] # A few warnings about invalid email addresses
@mpolinowski
mpolinowski / instarvb5.rb
Created November 5, 2019 03:23
vBulletin Import Script for Discourse
# frozen_string_literal: true
require 'mysql2'
require File.expand_path(File.dirname(__FILE__) + "/base.rb")
require 'htmlentities'
class ImportScripts::VBulletin < ImportScripts::Base
BATCH_SIZE = 1000
DBPREFIX = ""
ROOT_NODE = 2
@mpolinowski
mpolinowski / default.conf
Created January 10, 2020 13:53
NGINX Default config Debian 10
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
ContactInfo Infected InfectedAddress Contact Relationship ContactAddress Spread Geography
Fitness Studio PersonA CordonA PersonB Coworker CordonB New Territories
Fitness Studio PersonB CordonB PersonV Brother CordonB New Territories
Metro System PersonC CordonC PersonQ Sister CordonE 1 Island District
Metro System PersonD CordonD PersonAK Wife CordonG Central Island
Workplace PersonC CordonC PersonAL Wife CordonC 1 Central Island
Workplace PersonA CordonA PersonAL Wife CordonC 1 Central Island
Workplace PersonE CordonE PersonAM Sister CordonE 1 Central Island
Restaurant PersonF CordonF PersonO Coworker CordonD 0 Old District
Workplace PersonA CordonA PersonAK Coworker CordonG 0 Old District
@mpolinowski
mpolinowski / .eslintrc
Created July 10, 2020 07:26
ESLint configuration for Gatsby.js - setting react:version to "detect" to solve ERROR: "gatsby eslint Warning: React version not specified in eslint-plugin-react settings"
{
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"plugins": [
"graphql",
"react"
],

Docker Cheat Sheet

Remove all Docker Containers

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
@mpolinowski
mpolinowski / media_slack.xml
Created September 16, 2020 14:46
Zabbix Webhook configuration
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.0</version>
<date>2020-08-11T00:00:00Z</date>
<media_types>
<media_type>
<name>Slack</name>
<type>WEBHOOK</type>
<parameters>
<parameter>
@mpolinowski
mpolinowski / example.nomad
Created September 18, 2020 11:02
Example job description for the HashiCorp Nomad orchestration tool
# There can only be a single job definition per file. This job is named
# "example" so it will create a job with the ID and Name "example".
# The "job" stanza is the top-most configuration option in the job
# specification. A job is a declarative specification of tasks that Nomad
# should run. Jobs have a globally unique name, one or many task groups, which
# are themselves collections of one or many tasks.
#
# For more information and examples on the "job" stanza, please see
# the online documentation at:
@mpolinowski
mpolinowski / .gitlab-ci.yml
Created September 18, 2020 11:06
Gitlab CI example for a Docker-in-Docker docker image build (make sure that your repository has a valid Dockerfile before executing)
image: docker:19.03.12-dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
services:
- name: docker:19.03.12-dind
entrypoint: ["env", "-u", "DOCKER_HOST"]
command: ["dockerd-entrypoint.sh"]