Skip to content

Instantly share code, notes, and snippets.

View sujaypillai's full-sized avatar
🐳
Getting contained!!!

Sujay Pillai sujaypillai

🐳
Getting contained!!!
View GitHub Profile
@sujaypillai
sujaypillai / cleanAlfPropTables-MySQL.sql
Created January 13, 2016 13:56
SQL script for properly clearing Alfresco unused audit data / property values (NOT node properties, but the property tables used for AuditComponent and AttributeService functionality) for PostgreSQL / MySQL.NOTE: Only run when the Alfresco Repository is NOT running as values kept in in-memory caches will otherwise result in constraint violations.
set autocommit=0;
begin;
-- get all active references to alf_prop_root
create temporary table temp1 (id bigint(20), index (id));
insert into temp1 select disabled_paths_id as id from alf_audit_app;
insert into temp1 select audit_values_id as id from alf_audit_entry;
insert into temp1 select prop1_id as id from alf_prop_unique_ctx;
-- determine the obsolete entries from alf_prop_root
BITS 32
org 0x05000000
db 0x7F, "ELF"
dd 1
dd 0
dd $$
dw 2
dw 3
dd 0x0500001B
@sujaypillai
sujaypillai / docker-for-mac.md
Created July 18, 2018 15:39 — forked from BretFisher/docker-for-mac.md
Getting a Shell in the Docker for Mac Moby VM

2018 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Moby VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@sujaypillai
sujaypillai / Dockerfile
Created August 27, 2018 16:55 — forked from orenitamar/Dockerfile
Installing numpy, scipy, pandas and matplotlib in Alpine (Docker)
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib
# in an Alpine based Docker image.
FROM alpine:3.4
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add gcc gfortran python python-dev py-pip build-base wget freetype-dev libpng-dev openblas-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install numpy scipy pandas matplotlib

Windows Containers Logging

With Windows Containers, as with any application, you will need to consider your logging strategy. In the containers world it is generally accepted to log to STDOUT/STDERR (standard out and standard error). As you scale up your services you will need to aggregate and store these logs for analysis and debugging later on. There exist many back end systems to aggregate logs and help with analysis, in Azure you have Log Analytics and Application Insights.

There are two general strategies for configuring your containers to send logs to a backend logging system containers:

  • In container logging - Your application is responsible for sending the logs directly to the backend system. This can also be [configured via sidecar].
  • Host level logging - You application is configured for sending logs to a log collection agent on the system. The logging agent will
@sujaypillai
sujaypillai / fluentd.conf
Created May 21, 2019 16:09 — forked from jsturtevant/fluentd.conf
simple fluentd conf
<source>
@type forward
</source>
<match test.**>
@type stdout
</match>