Skip to content

Instantly share code, notes, and snippets.

@tivrfoa
tivrfoa / README.md
Last active April 7, 2024 23:30
rust-analyzer with neovim for the Linux Kernel - Rust for Linux
@superseb
superseb / k3s-etcd-commands.md
Last active June 5, 2024 20:52
k3s etcd commands

k3s etcd commands

etcd

Setup etcdctl using the instructions at https://github.com/etcd-io/etcd/releases/tag/v3.4.13 (changed path to /usr/local/bin):

Note: if you want to match th etcdctl binaries with the embedded k3s etcd version, please run the curl command for getting the version first and adjust ETCD_VER below accordingly:

curl -L --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key https://127.0.0.1:2379/version
@ctron
ctron / tekton-cleanup.yaml
Last active May 10, 2024 12:18
Cleaning up Tekton pipeline runs
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cleaner
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cleaner
@miguelmota
miguelmota / auth.json
Created February 21, 2019 03:08
AWS Cognito Identity authenticate using cURL
{
"AuthParameters" : {
"USERNAME" : "alice@example.com",
"PASSWORD" : "mysecret"
},
"AuthFlow" : "USER_PASSWORD_AUTH",
"ClientId" : "9..............."
}
@trondhindenes
trondhindenes / .gitlab-ci.yml
Last active April 17, 2024 10:07
Run KinD (Kubernetes in Docker) as part of Gitlab CI job
#Spin up Kubernetes control plane as part of before_script, and destroys it using after_script
#Some custom logic to get to the right ip address
#Requres the gitlab docker runner, with "pass-thru" to the host docker socket.
stages:
- test
image: python:3.6.6 #the docker image you run in needs Docker installed, and access to the host docker socket.
test_integration_k8s:
tags:
@samanshahmohamadi
samanshahmohamadi / MappingTest.sol
Created January 15, 2019 09:40
How to return whole mapping in solidity
pragma solidity ^0.4.25;
contract MappingTest {
mapping(uint=>address) public addresses;
uint addressRegistryCount;
function set(address userAddress) public{
addresses[addressRegistryCount] = userAddress;
addressRegistryCount++;
}
@bgadrian
bgadrian / hugo_lazy_img.md
Last active May 1, 2020 19:46
Hugo lazy image loading

I presume the images are bundled as post resources in the ./images/ folder.

It creates a new version at 5% of its original quality that is fetched in the initial page load. When and if the original image is loaded by the browser it will replace the low quality one.

{{< lazyimg "images/1.jpeg" >}} {{< lazyimg "images/1.jpeg" "caption" >}}

@ecwyne
ecwyne / CampFireHousing.ts
Last active July 23, 2019 08:05
Serverless CampFireHousing
import fetch from 'node-fetch';
import Twitter from 'twit';
import { parse, format } from 'fecha';
import { take } from 'ramda';
const URL = 'GOOGLE_SHEETS_URL';
const T = new Twitter({
consumer_key: 'consumer_key',
consumer_secret: 'consumer_secret',
@uraimo
uraimo / dnsovertls.md
Last active May 27, 2024 18:17
Configure your Mac to use DNS over TLS
@StevenACoffman
StevenACoffman / fluent-filebeat-comparison.md
Last active April 2, 2024 22:34
Fluentd Fluent-bit FileBeat memory and cpu resources

Fluent-bit rocks

A short survey of log collection options and why you picked the wrong one. 😜

Who am I? Where am I from?

I'm Steve Coffman and I work at Ithaka. We do JStor (academic journals) and other stuff. How big is it?

Number what it means
101,332,633 unique visitors in 2017