Skip to content

Instantly share code, notes, and snippets.

View ldx's full-sized avatar
🌪️
Wreaking havoc

Vilmos Nebehaj ldx

🌪️
Wreaking havoc
View GitHub Profile
@ldx
ldx / dns.js
Last active May 17, 2021 18:55
const fs = require('fs');
const dns = require('dns');
const args = process.argv.slice(2)
const hostname = args[0]
fs.readFile('/etc/resolv.conf', (err, data) => {
if (err) {
console.dir(err);
} else {
@ldx
ldx / ssm-agent-daemonset.yaml
Created October 21, 2020 21:28
Install ssm-agent on EKS worker nodes via a Kubernetes daemonset.
# This is based on https://github.com/mumoshu/kube-ssm-agent, but installs ssm-agent directly at start time, instead of using a pre-built image.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: ssm-agent
namespace: ssm-agent
labels:
k8s-app: ssm-agent
spec:
selector:
---
apiVersion: eksctl.io/v1alpha4
kind: ClusterConfig
metadata:
name: elotltest
region: us-east-1
nodeGroups:
- name: milpa
@ldx
ldx / build-via-milpa.sh
Created April 10, 2019 18:29
Jenkins managed build script to run jobs as Milpa pods
#!/bin/bash -e
# Install jq if missing.
JQ="/tmp/jq"
$JQ --version || {
echo "Can't find jq, trying to install it"
wget -O $JQ https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
chmod 755 $JQ
}
echo "jq version:" $($JQ --version)
@ldx
ldx / create-docker-config.sh
Last active December 12, 2018 00:00
Create docker configuration file with authentication info
#!/bin/bash
set -euo pipefail
if [[ "$DOCKER_USER" = "" ]]; then
echo "Please set \$DOCKER_USER"
exit 1
fi
if [[ "$DOCKER_PASSWORD" = "" ]]; then
echo "Please set \$DOCKER_PASSWORD"
exit 1
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Wed Apr 20 03:12:05 2016
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
##
char *jsonp_strndup(const char *str, size_t len)
{
char *new_str;
new_str = jsonp_malloc(len + 1);
if(!new_str)
return NULL;
memcpy(new_str, str, len);
new_str[len] = '\0';
Program received signal SIGABRT, Aborted.
0x00007ffff7218458 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
55 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff7218458 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:55
#1 0x00007ffff72198da in __GI_abort () at abort.c:89
#2 0x00007ffff7256fca in __libc_message (do_abort=do_abort@entry=2,
fmt=fmt@entry=0x7ffff734ec98 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175
from OpenSSL import SSL
import sys
import os
import socket
def verify_cb(conn, cert, errnum, depth, ok):
print 'Got certificate: %s' % cert.get_subject()
return ok
@ldx
ldx / appium.log
Created January 7, 2015 10:50
Appium log
2015-01-07 10:41:45:207 - info: Welcome to Appium v1.3.4 (REV 1c446f71b2759202b9677326c2a972b0b1377af9)
2015-01-07 10:41:45:211 - info: Appium REST http interface listener started on 0.0.0.0:4443
2015-01-07 10:41:45:217 - info: [debug] Non-default server args: {"port":4443,"callbackAddress":"127.0.0.1","backendRetries":4,"launchTimeout":"40000","logTimestamp":true,"logNoColors":true,"browserName":"safari","orientation":"portrait","showSimulatorLog":true,"keepKeyChains":true,"isolateSimDevice":true}
2015-01-07 10:41:45:218 - warn: Deprecated server args: {"--show-sim-log":"use instead: --show-ios-log"}
2015-01-07 10:41:45:218 - info: Console LogLevel: debug
2015-01-07 10:41:45:671 - info: --> POST /wd/hub/session {"desiredCapabilities":{"deviceName":"iPhone Simulator","javascriptEnabled":true,"webdriver.remote.quietExceptions":true,"browserName":"safari","platformVersion":"8.1","platformName":"iOS"}}
2015-01-07 10:41:45:674 - info: Client User-Agent string: undefined
2015-01-07 10:41:45:675 - info: [debug] The