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
// change your piwik server host
// change YOUR_SITE_ID with your site id
<amp-pixel src="https://piwik.example.org/piwik.php?idsite=YOUR_SITE_ID&rec=1&action_name=TITLE&urlref=DOCUMENT_REFERRER&url=CANONICAL_URL&rand=RANDOM"></amp-pixel>
@mpolinowski
mpolinowski / gist:94a2e4b1120eeb56c056ba40532bd7ff
Created March 30, 2018 06:12
Using fade-in Animation in Glamor
let fadein = css.keyframes({
'0%': { opacity: 0 },
'100%': { opacity: 1 }
})
let lazyload = css({
animation: `${fadein} 2s`,
})
@mpolinowski
mpolinowski / NGINX Config IPv6 Issue
Created April 1, 2018 09:31
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Error Message:
```
Redirecting to /bin/systemctl status -l nginx.service
● nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2018-03-31 15:54:13 CEST; 16h ago
Process: 18761 ExecReload=/bin/kill -s HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 13076 ExecStart=/usr/sbin/nginx (code=exited, status=1/FAILURE)
Process: 13072 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)

Uninstall Kubernetes from Centos 7

kubectl drain \<node name\> --delete-local-data --force --ignore-daemonsets

kubectl delete node \<node name\>
This file has been truncated, but you can view the full file.
2019-06-17 12:14:39.661 [ERROR] [org.eclipse.smarthome.core ] - bundle org.eclipse.smarthome.core:0.11.0.oh250M1 (102)[org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl(65)] : doFindMethod: Suitable but non-accessible method found in class org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl
2019-06-17 12:14:39.691 [ERROR] [org.eclipse.smarthome.core ] - bundle org.eclipse.smarthome.core:0.11.0.oh250M1 (102)[org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl(65)] : findMethod: Suitable but non-accessible method setScheduler found in class org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl, subclass of org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl
2019-06-17 12:14:39.694 [ERROR] [org.eclipse.smarthome.core ] - bundle org.eclipse.smarthome.core:0.11.0.oh250M1 (102)[org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl(65)] : bind method [setScheduler] not found; Component will fail
2
2019-06-17 12:14:55.358 [.ItemChannelLinkAddedEvent] - Link 'INSTARHDIPCameraWithONVIFAndAPISupport_Pan-ipcamera:INSTAR:14e0df61:pan' has been added.
2019-06-17 12:14:55.361 [.ItemChannelLinkAddedEvent] - Link 'INSTARHDIPCameraWithONVIFAndAPISupport_ThresholdForTheAudioAlarm-ipcamera:INSTAR:1779690a:thresholdAudioAlarm' has been added.
2019-06-17 12:14:55.371 [.ItemChannelLinkAddedEvent] - Link 'INSTARHDIPCameraWithONVIFAndAPISupport_SnapshotFromCamera-ipcamera:INSTAR:834b227a:image' has been added.
2019-06-17 12:14:55.380 [.ItemChannelLinkAddedEvent] - Link 'AlarmAreasIN8015_AlarmAreas-mqtt:topic:8015-alarm-areas:OfficeCam' has been added.
2019-06-17 12:14:55.382 [.ItemChannelLinkAddedEvent] - Link 'IN9020FullHD_RTSPURL-ipcamera:INSTAR:eb0d50e2:rtspUrl' has been added.
2019-06-17 12:14:55.385 [.ItemChannelLinkAddedEvent] - Link 'test-ipcamera:INSTAR:eb0d50e2:enableMotionAlarm' has been added.
2019-06-17 12:14:55.387 [.ItemChannelLinkAddedEvent] - Link 'Test_Pan-ipcamera:INSTAR:a339f440:pan' has been added.
2
@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 / 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 / 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 |
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