Skip to content

Instantly share code, notes, and snippets.

View birkof's full-sized avatar
🤟

Daniel Stancu birkof

🤟
View GitHub Profile
Sudo su
Install Node Exporter:
docker run -d --net="host" --pid="host" -v "/:/host:ro,rslave" quay.io/prometheus/node-exporter:latest --path.rootfs=/host
Create Prometheus Config:
nano prometheus.yml

Enable Docker Remote API with TLS client verification

Docker's Remote API can be secured via TLS and client certificate verification.
First of all you need a few certificates and keys:

  • CA certificate
  • Server certificate
  • Server key
  • Client certificate
  • Client key

Create certificate files

@birkof
birkof / index.html
Created March 15, 2016 08:21 — forked from mandulaj/index.html
Webssh
<!doctype html>
<html>
<head>
<title>SSH Client</title>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.5/socket.io.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
@birkof
birkof / 1_Result.php
Created February 27, 2016 01:36 — forked from cystbear/1_Result.php
Custom annotations in Symfony2 (http://habrahabr.ru/blogs/symfony/133270/)
<?php
class DefaultController extends Controller
{
/**
* Dashboard page.
* @Permissions(perm="dashboard_view")
* @Route("/", name="ITEDashboardBundle_index")
* @Template()
* @return array
@birkof
birkof / a new mac setup.md
Last active August 29, 2015 14:27 — forked from maxfenton/a-new-mac-setup.md
System setup stuff for a new mac

New computer setup

  • a/o 2015-07-24 *

Format the drive

  1. Restart with cmd-R or cmd-D
  2. Erase drive / 3x if second-handk
  3. Reinstall MacOS
@birkof
birkof / test_wifi.ino
Last active August 29, 2015 14:19 — forked from volca/test_wifi.ino
#include <SoftwareSerial.h>
// Important!! We use pin 13 for enable esp8266
#define WIFI_ENABLE_PIN 13
#define DEBUG 1
#define SSID "YOUR-WIFI-SSID"
#define PASS "YOUR-WIFI-SECRET"
#include <PubSubClient.h>
#include <ESP8266WiFi.h>
const char* ssid = ".................";
const char* password = "................";
char* topic = "esp8266_arduino_out";
char* server = "iot.eclipse.org";
{
"name": "socket.io.1.0",
"version": "1.0.0",
"description": "Socket.IO 1.0 using Primus",
"main": "socket.io.1.0.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
# install git
yum install git -y
# get nvm
git clone git://github.com/creationix/nvm.git ~/nvm
# activate nvm