Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Mattia Procopio MattBlack85

🎯
Focusing
View GitHub Profile
View gist:4b33328edd7873209e7dfc9454e3aa44
Exception: invocation of aws:route53/getZone:getZone returned an error: 1 error occurred:
* error configuring Terraform AWS Provider: IAM Role (arn:aws:iam::XXXXXXXXXXXX:role/PulumiRoute53) cannot be assumed.
There are a number of possible causes of this - the most common are:
* The credentials used in order to assume the role are invalid
* The credentials do not have appropriate permission to assume the role
* The role ARN is not valid
Error: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
View pulumi.py
DOMAIN_NAME = DNS_STACK_REFERENCE.get_output('domain_name')
nginx_definition = DOMAIN_NAME.apply(
lambda domain_name: build_task_definition(
project_name=project_name,
container_name='prometheus-nginx-vts-exporter',
depends_on=[{'containerName': project_name, 'condition': 'START'}],
image='docker.io/sophos/nginx-vts-exporter',
links=['relay:relay'],
memory_reservation=64,
View guide.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 1 column, instead of 3. in line 2.
KStars version 3.4.3. PHD2 log version 2.5. Log enabled at 2020-09-07 21:57:09
Calibration Begins at 2020-09-07 21:57:09
Pixel scale = 4.98 arc-sec/px, Binning = 1, Focal length = 120 mm
RA = 21.68 hr, Dec = 57.2 deg, Hour angle = N/A hr, Pier side = West, Rotator pos = N/A, Alt = 76.9 deg, Az = 49.7 deg
Direction,Step,dx,dy,x,y,Dist
West,1,0.000,0.000,1335.000,901.000,0.000
West,2,0.387,1.077,1335.387,902.077,1.144
West,3,0.684,1.496,1335.684,902.496,1.645
West,4,1.362,2.342,1336.362,903.342,2.710
View pulumi_deprecation_warnings
================================================= warnings summary =================================================
/home/matt/.local/share/virtualenvs/cyclope-mw2Vtk-i/lib/python3.8/site-packages/parver/_version.py:116
/home/matt/.local/share/virtualenvs/cyclope-mw2Vtk-i/lib/python3.8/site-packages/parver/_version.py:116: DeprecationWarning: The usage of `cmp` is deprecated and will be removed on or after 2021-06-01. Please use `eq` and `order` instead.
@attr.s(frozen=True, repr=False, cmp=False)
/home/matt/.local/share/virtualenvs/cyclope-mw2Vtk-i/lib/python3.8/site-packages/pulumi_aws/applicationloadbalancing/get_listener.py:12
/home/matt/.local/share/virtualenvs/cyclope-mw2Vtk-i/lib/python3.8/site-packages/pulumi_aws/applicationloadbalancing/get_listener.py:12: DeprecationWarning: aws.applicationloadbalancing.getListener has been deprecated in favour of aws.alb.getListener
warnings.warn("aws.applicationloadbalancing.getListener has been deprecated in favour of aws.alb.getListener", Deprecat
View xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 390.77 (buildmeister@swio-display-x64-rhel04-14) Tue Jul 10 23:19:22 PDT 2018
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen1" 0 0
Screen 1 "Screen0" RightOf "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
View socket.lisp
(require ':cffi)
(defpackage :cffi-sock
(:use :common-lisp :cffi))
(in-package :cffi-sock)
(define-foreign-library msocket
(:unix (:or "libc.so.6" "libc.so"))
(t (:default "msocket")))
View server.lisp
(require 'usocket)
(defun end-string (string how-many)
(let ((str-length (length string)))
(if (or (< str-length how-many)
(not string))
string
(subseq string (- str-length how-many) str-length))))
View some.tf
provider "aws" {
version = "2.13.0"
region = "eu-west-2"
shared_credentials_file = "/aws/credentials"
profile = "dev"
}
provider "aws" {
version = "2.13.0"
region = "us-east-1"
View log_server.py
from aiohttp import web
async def hello(request):
print('HELLO')
return web.json_response({"Hello": "world"})
app = web.Application()
app.add_routes([web.post('/', hello)])
web.run_app(app)
View send_logs.py
import logging
import time
from logging.handlers import SocketHandler
logger = logging.getLogger('test')
class BinarySocketHandler(SocketHandler):
def prepare_record(self, record):
return self.format(record).encode()