Skip to content

Instantly share code, notes, and snippets.

View galek's full-sized avatar
🧭
I'm ready for new discoveries

Nikolay Galko galek

🧭
I'm ready for new discoveries
View GitHub Profile
@rahulkj
rahulkj / generate_certs.sh
Created September 9, 2022 14:46
Script to generate self signed certificate on Ubuntu
#!/bin/bash
###### For generate_certs.sh script ######
export COUNTRY=US
export STATE=California
export CITY=Irvine
export ORGANIZATION=YourCompany
export UNIT=YourBU
export COMMON_NAME=server.example.com
export SAN_NAME_1=server.example.com
@tosin2013
tosin2013 / microshift-istio.md
Created July 22, 2021 15:03
Run isitio on microshift

Install istio on mircoshift

You can find the installation instuctions in the link below.

Add metrics server components

kubectl apply -f https://raw.githubusercontent.com/redhat-et/ushift-workload/master/metrics-server/metrics-components.yaml
@broofa
broofa / checkForUndefinedCSSClasses.js
Last active January 21, 2024 17:22
ES module for detecting undefined CSS classes (uses mutation observer to monitor DOM changes). `console.warn()`s undefined classes.
/**
* Sets up a DOM MutationObserver that watches for elements using undefined CSS
* class names. Performance should be pretty good, but it's probably best to
* avoid using this in production.
*
* Usage:
*
* import cssCheck from './checkForUndefinedCSSClasses.js'
*
* // Call before DOM renders (e.g. in <HEAD> or prior to React.render())
@LeZuse
LeZuse / howto.md
Last active July 5, 2023 07:52
Disable Docker for Mac auto-update

Docker downloads all updates into a directory in /Users/$USER/Library/Caches/com.docker.docker/org.sparkle-project.Sparkle Let's make this directory inaccessible to the user under which Docker is going to run (you).

Switch to root user:

  sudo su

Change directory ownership and prevent access to other users:

// Option 1
async function streamToString(stream: NodeJS.ReadableStream): Promise<string> {
const chunks: Array<any> = [];
for await (let chunk of stream) {
chunks.push(chunk)
}
const buffer = Buffer.concat(chunks);
return buffer.toString("utf-8")
}
@reillysiemens
reillysiemens / signing-vbox-kernel-modules.md
Last active April 17, 2024 15:35
Signing VirtualBox Kernel Modules

Signing VirtualBox Kernel Modules

These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].

  1. Install the VirtualBox package (this might be different for your platform).
    src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
@mohanramphp
mohanramphp / DateTime.js
Created January 9, 2019 08:52
DateTime Component using React hooks
import React, { useState, useEffect } from 'react';
export const DateTime = () => {
const [dateTime, setDateTime] = useState(new Date());
useEffect(() => {
const id = setInterval(() => setDateTime(new Date()), 1000);
return () => {
clearInterval(id);
}
@viktorbenei
viktorbenei / main.go
Last active October 14, 2023 00:53
sha1 hmac hexdigest signature
package main
import (
"crypto/hmac"
"crypto/sha1"
"crypto/subtle"
"encoding/hex"
"fmt"
"os"
)
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active April 12, 2024 17:23
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@Ryanb58
Ryanb58 / install.md
Last active April 19, 2024 08:38
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> 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]