Skip to content

Instantly share code, notes, and snippets.

@cveilleux
cveilleux / zfs_0.8.4.bb
Created May 15, 2020 11:50
OpenZFS 0.8.4 Yocto recipe
SUMMARY = "ZFS"
DESCRIPTION="ZFS"
HOMEPAGE = "https://zfsonlinux.org/"
LICENSE = "CDDL"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa"
SRC_URI = "https://github.com/openzfs/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
SRC_URI[md5sum] = "f0c203c59c4fcd44187a64758707469f"
SRC_URI[sha256sum] = "2b988f5777976f09d08083f6bebf6e67219c4c4c183c1f33033fb7e5e5eacafb"
// // https://twitter.com/settings/your_twitter_data/twitter_interests
// Lots of discussion and improvement of the original script in the comments
// Here's the best version that works well
// Because Twitter stops the script working after unchecking 50 interests, so you will almost certainly have to run the script multiple times
function sleep(milliseconds) {
return new Promise(function (resolve) {
return setTimeout(resolve, milliseconds);
});
@glogiotatidis
glogiotatidis / remove-gpg-user.sh
Created May 24, 2016 11:50
Git-crypt remove user.
#!/bin/bash
#
# Script to remove GPG key from git-crypt
#
# It will re-initialize git-crypt for the repository and re-add all keys except
# the one requested for removal.
#
# Note: You still need to change all your secrets to fully protect yourself.
# Removing a user will prevent them from reading future changes but they will
# still have a copy of the data up to the point of their removal.
@skippy
skippy / cloud-config.yml
Created December 31, 2014 18:38
modifying fleet metadata (from aws meta-data service) before fleet.service start; this is a proof of concept (but it works!)
#cloud-config
---
coreos:
units:
- name: update-fleet-metadata.service
command: start
content: |-
[Unit]
Description=Update Fleet metadata tag
Before=fleet.service
@dysinger
dysinger / coreos-kubernetes-vpc-playbook.yml
Created November 14, 2014 21:40
CoreOS Kubernetes AWS VPC Playbook
---
- connection: local
hosts: 127.0.0.1
tasks:
- local_action:
description: Kubernetes Security Group
module: ec2_group
name: kubernetes
region: '{{ aws.region }}'
rules:
@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

@nickjacob
nickjacob / systemd-prblm.service
Last active March 17, 2023 16:11
execute arbitrary bash code/variable substitution in systemd units
[Unit]
Description=Demonstrate Bash
[Service]
ExecStartPre=/usr/bin/bash -c "/usr/bin/systemctl set-environment MYVAR=$(( 2 + 2 ))"
ExecStart=/usr/bin/echo "2 + 2 = ${MYVAR}"
"""
Python 2:
$ python-2.7 finallyfun.py
e: Exception()
Python 3:
$ python3.3 finallyfun.py
Traceback (most recent call last):
File "finallyfun.py", line 9, in <module>
foo()
@debasishg
debasishg / gist:8172796
Last active November 11, 2024 07:10
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@jvanasco
jvanasco / custom_sessions.py
Last active December 18, 2015 18:39
configurable sessions with pyramid
import logging
log = logging.getLogger(__name__)
import pyramid_beaker
from pyramid.session import UnencryptedCookieSessionFactoryConfig
import types
valid_args_pyramid_UnencryptedCookieSessionFactoryConfig = [
'secret',