Skip to content

Instantly share code, notes, and snippets.

View borisceranic's full-sized avatar

Boris Ćeranić borisceranic

View GitHub Profile
@suhailpatel
suhailpatel / qcon-london-2022.py
Created March 19, 2022 21:41
A CLI to interact with the QCon London 2022 website
#!/usr/bin/python3
import cmd, re, sys, traceback
from dataclasses import dataclass
from typing import List
import requests
from bs4 import BeautifulSoup
# This is part of Suhail's talk on the Developer Enablement
# track at QCon London 2022
@butageek
butageek / windows_activation.md
Last active May 2, 2024 12:01
Activate Windows for free

For Windows 10

Step 1 - Open PowerShell or Command Prompt as administrator

Step 2 - Install KMS client key

slmgr /ipk your_license_key

Replace your_license_key with following volumn license keys according to Windows Edition:

@ai
ai / cloudflare-matomo-worker.js
Last active March 28, 2024 19:11
Cloudflare worker to send statistics to Matomo
async function trackVisit (request, visitorId) {
let data = {
token_auth: 'secret',
country: request.headers.get('CF-IPCountry'),
urlref: request.referrer || request.headers.get('Referer'),
idsite: 1,
lang: request.headers.get('Accept-Language'),
apiv: 1,
rand: Math.random().toString(16).slice(2),
url: request.url,
@leopoldodonnell
leopoldodonnell / Readme.md
Last active April 9, 2024 07:44
Install and run Postgres with an extension using docker-compose

Local Postgres

This gist is an example of how you can simply install and run and extended Postgres using docker-compose. It assumes that you have docker and docker-compose installed and running on your workstation.

Install

  • Requires docker and docker-compose
  • Clone via http: git clone https://gist.github.com/b0b7e06943bd389560184d948bdc2d5b.git
  • Make load-extensions.sh executable
  • Build the image: docker-compose build
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active September 28, 2023 14:54
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

  1. Humans build and fix systems.
  2. Humans get tired and stressed, they feel happy and sad.
  3. Systems don't have feelings yet. They only have SLAs.
  4. Humans need to switch off and on again.
  5. The wellbeing of human operators impacts the reliability of systems.
  6. Alert Fatigue == Human Fatigue
  7. Automate as much as possible, escalate to a human as a last resort.
  8. Document everything. Train everyone. Save time.
  9. Kill the shame game.
  10. Human issues are system issues.
@sectore
sectore / 01-createObservableFromDeviceEventEmitter.js
Last active November 26, 2023 06:42
[React Native + RxJS] Create an Observable from DeviceEventEmitter - An example to handle 'locationUpdated' event
import React, {DeviceEventEmitter} from 'react-native';
import {Observable} from 'rx-lite'
/**
* Creates an Observable to listen to any event of DeviceEventEmitter
* @param type {string} Event type
*/
export default createObservableFromDeviceEventEmitter$ = type => {
let subscription;
return Observable.fromEventPattern(
@jtopjian
jtopjian / consul_dynamic_inventory.rb
Created October 14, 2014 01:27
Ansible Dynamic Inventory with Consul
#!/usr/bin/env ruby
require 'net/http'
require 'uri'
require 'json'
require 'pp'
consul_url = 'http://localhost:8500/v1/catalog'
output = {}
s_json = JSON.parse(Net::HTTP.get_response(URI.parse("#{consul_url}/services")).body)
@andyshinn
andyshinn / README.md
Last active March 24, 2022 06:40
CoreOS on Digital Ocean using Terraform

Terraform, CoreOS, and Digital Ocean

Let's use Terraform to easily get a CoreOS cluster up on Digital Ocean. In this example we will get a 5 node CoreOS cluster up and running on the Digital Ocean 8GB size.

Install Terraform

Grab a copy of Terraform for your platform from http://www.terraform.io/downloads.html. Follow the instructions at http://www.terraform.io/intro/getting-started/install.html by getting Terraform in your PATH and testing that it works.

Digital Ocean API Key

@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048