Skip to content

Instantly share code, notes, and snippets.

@kule
kule / mini_rspec.rb
Created September 11, 2018 09:37
Simplified example of how rspec works
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'colorize'
end
class MatcherInterface
def initialize(some_object)
@some_object = some_object
@arastu
arastu / create-cert-and-key-with-certbot.sh
Last active March 15, 2021 04:28
Configuring Harbor with HTTPS Access via letsencrypt(certbot with --standalone flag)
sudo certbot certonly --standalone -d registry.example.com
@RyanEager
RyanEager / van_down.py
Last active May 18, 2023 06:52
Scrape full sized images form vangoghmuseum.nl
"""
Scrape full sized images from vangoghmuseum.nl
---- requrires.txt ------------------------------------------------------------
beautifulsoup4==4.6.0
bs4==0.0.1
certifi==2018.4.16
chardet==3.0.4
idna==2.7
Pillow==5.2.0
python-slugify==1.2.5
@diffficult
diffficult / installing_virt_manager.md
Last active May 21, 2024 18:42
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group:

@RichardBronosky
RichardBronosky / README.md
Last active December 1, 2023 08:19
Using cloud-init for cloudless provisioning of Raspberry Pi

Installing cloud-init on a fresh Raspbian Lite image

This is a work in Progress!

Purpose

This mainly demonstrates my goal of preparing a Raspberry Pi to be provisioned prior to its first boot. To do this I have chosen to use the same cloud-init that is the standard for provisioning servers at Amazon EC2, Microsoft Azure, OpenStack, etc.

I found this to be quite challenging because there is little information available for using cloud-init without a cloud. So, this project also servers as a demonstration for anyone on any version of Linux who may want to install from source, and/or use without a cloud. If you fall into that later group, you probably just want to read the code. It's bash so everything I do, you could also do at the command line. (Even the for loop.)

@owainlewis
owainlewis / gist:77b241a0063ddf4a9541b71323b07bc0
Created February 13, 2018 12:17
Delete all non running Kubernetes pods
kubectl get pods -a | grep -v Running | awk '{print $1}' | xargs kubectl delete pod
@steven2358
steven2358 / ffmpeg.md
Last active May 10, 2024 20:57
FFmpeg cheat sheet
@andrewjjenkins
andrewjjenkins / Dockerfile.minikube
Created January 23, 2018 21:28
Istio-Minikube and Jenkins
# Portions Copyright 2016 The Kubernetes Authors All rights reserved.
# Portions Copyright 2018 AspenMesh
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@htruong
htruong / chroot-to-pi.sh
Last active May 17, 2024 13:12
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@ErikAugust
ErikAugust / spectre.c
Last active May 22, 2024 23:07
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif