>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found
/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
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 byte led_pin = LED_BUILTIN; | |
const byte interrupt_pin = 2; | |
volatile byte state = LOW; | |
unsigned long interrupt_time = millis(); | |
const unsigned long delay_time = 50; // Delay for every push button may vary | |
void setup() { | |
pinMode(led_pin, OUTPUT); | |
pinMode(interrupt_pin, INPUT_PULLUP); |
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
# See API docs at http://nexus-url/#admin/system/api | |
import requests | |
USERNAME = 'user' | |
PASSWORD = 'password' | |
NEXUS_BASE_URL = 'http://nexus-url/service/rest/beta' | |
REPOSITORY = 'some-project-snapshots' | |
GROUP_FILTER = 'com.some.group' |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# vim:set ts=4 sw=4 et: | |
# Copyright 2019 Artem Smirnov | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at |
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
#!/bin/bash | |
# | |
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext | |
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just | |
# from time to time | |
# | |
# Usage: ./checkpoint.sh | |
# | |
# The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up. | |
# Or, make an Automator action and paste the script. You will need sudo power. |
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 piexif | |
import re | |
import datetime | |
class GpsIdf(object): | |
def __init__(self, gpsIdf): | |
self.gpsIdf = gpsIdf |
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
#!/bin/sh | |
# | |
# Inspired by https://github.com/kumina/shutdown-kvm-guests/blob/master/shutdown-kvm-guests.sh | |
# | |
# Configure timeout (in seconds). | |
TIMEOUT=300 | |
VIRSH=/usr/bin/virsh | |
# List running domains. | |
list_domains_by_state() { |
For excessively paranoid client authentication.
Original: https://gist.github.com/mtigas/952344
openssl x509 -in server.crt -out server.der -outform DER
openssl x509 -in server.der -inform DER -out server.pem -outform PEM
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
########################### | |
# bcm2835_unicam drivers # | |
########################### | |
# DESCRIPTION: Install bcm2835_unicam/tc358743 drivers from 6by9 Linux fork | |
# This should also work for adv7282m ov5647 (https://github.com/6by9/linux/commit/28ac7b3a2651d4b35204938e6c9ec2e4ba54c34e) | |
# | |
# CAUTION | |
# * Do not start this script! Copy/Paste each command. | |
# * Compilation will take over 1h30. | |
# * Any errors can potentially break the entire system |
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
#for not running docker, use save: | |
docker save <dockernameortag> | gzip > mycontainer.tgz | |
#for running or paused docker, use export: | |
docker export <dockernameortag> | gzip > mycontainer.tgz | |
#load | |
gunzip -c mycontainer.tgz | docker load |
NewerOlder