This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stage 1: Build | |
FROM python:3.9 as build | |
WORKDIR /app | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Stage 2: Runtime | |
FROM python:3.9-slim as runtime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import csv | |
#Login using: curl -i -d '{"login_id":"EMAIL","password":"PASSWORD"}' https://mattermost-server.com/api/v4/users/login | |
#Copy the token | |
auth_token = raw_input("Please enter your auth token: ") | |
posts = raw_input("Please enter the filename to parse: ") | |
hed = {'Authorization': 'Bearer ' + auth_token} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WebSocket = require('ws'); | |
var ws = new WebSocket("ws://YourMattermostServer:8065/api/v4/websocket"); | |
ws.on('open', function open(){ | |
var msg = { | |
"seq": 1, | |
"action": "authentication_challenge", | |
"data": { | |
"token": "YourTokenFromTheMattermostCookie" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: compliance | |
# Recipe:: default | |
# | |
# Copyright (c) 2016 The Authors, All Rights Reserved. | |
case node[:platform] | |
when "ubuntu" | |
cookbook_file 'tmp/chef-compliance_0.14.5-1_amd64.deb' do | |
source 'chef-compliance_0.14.5-1_amd64.deb' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'koala' | |
APP_ID = "" | |
APP_SECRET = "" | |
access_token = "" | |
oauth = Koala::Facebook::OAuth.new(APP_ID, APP_SECRET) | |
oauth.exchange_access_token_info(access_token) | |
@graph = Koala::Facebook::API.new(access_token) |