Skip to content

Instantly share code, notes, and snippets.

View iflowfor8hours's full-sized avatar
💭
on the lookout.

mxs iflowfor8hours

💭
on the lookout.
View GitHub Profile
@sebsto
sebsto / code-stack.ts
Last active October 12, 2023 13:12
CDK Create EC2 instace in private subnet. Install Nginx.
import ec2 = require('@aws-cdk/aws-ec2');
import cdk = require('@aws-cdk/core');
import { Fn, Tag, Resource } from '@aws-cdk/core';
import { AmazonLinuxImage, UserData, InstanceType } from '@aws-cdk/aws-ec2';
import { Role, ServicePrincipal, ManagedPolicy, CfnInstanceProfile } from '@aws-cdk/aws-iam'
/**
* Create my own Ec2 resource and Ec2 props as these are not yet defined in CDK
* These classes abstract low level details from CloudFormation
@ingenieroariel
ingenieroariel / configuration.nix
Created May 2, 2019 13:15
HP Envy x360 + Nixos + Sway + i3statusbar-rs in a single file with 500 lines.
{ config, lib, pkgs, ... }:
let
domain = "puerti.co";
waylandOverlay = (import (builtins.fetchTarball ({
url = "https://github.com/piensa/wayner/archive/1e62268.tar.gz";
sha256 = "07hzhdc9ic3sk4ivd0g3lx2f7jnr3wkrrr884hf5b1n7adzglh50";
})));
@nginx-gists
nginx-gists / nginx-plus-api.conf
Last active November 10, 2022 23:52
Live Activity Monitoring with the NGINX Plus API in 3 Simple Steps
# This sample NGINX Plus configuration enables the NGINX Plus API, for live
# activity monitoring and the built-in dashboard, dynamic configuration of
# upstream groups, and key-value stores. Keep in mind that any features
# added to the API in future NGINX Plus releases will be enabled
# automatically by this file.
# Created in May 2018 by NGINX, Inc. for NGINX Plus R14 and later.
# Documentation:
# https://docs.nginx.com/nginx/admin-guide/monitoring/live-activity-monitoring/
# https://www.nginx.com/blog/live-activity-monitoring-nginx-plus-3-simple-steps
@higebu
higebu / fix_iso.sh
Last active July 21, 2018 08:01
Install VyOS on apu2c4 with USB stick
#!/bin/bash
iso=$1
if [ -z "$iso" ]; then
echo "please specify the iso"
exit 0
fi
sudo apt install -y squashfs-tools genisoimage syslinux-utils
# fix boot
@sammcj
sammcj / bmw_reflash_carsoft.md
Created May 10, 2018 00:41
bmw carsoft reprogram

Reprogram BMW after doing Automatic to Manual Conversion. (Based on my E36 experience)

written by Ross W, and Sam M.

This guide assumes the following:

  • You have programmed a BMW ECU/DME before using DIS or similar.
  • You are taking all the necessary safety precautions. (Fully charged battery etc…)
  • You have DIS working (We used EasyDIS 1.0, Base 44)
  • You have Ediabas (INPA, NCS Expert, IFH Serve) installed and working.
@narkq
narkq / hostsfile.py
Last active February 13, 2019 15:52 — forked from jtyr/hostsfile.py
Ansible dynamic inventory script that reads any Ansible hosts file and transforms it into the JSON data structure.
#!/usr/bin/python2
#####
#
# Description
# -----------
#
# This is an Ansible dynamic inventory script that reads any Ansible hosts file
# and transforms it into the JSON data structure.
#
@Neo23x0
Neo23x0 / audit.rules
Last active January 13, 2024 14:12
Linux Auditd Best Practice Configuration
# IMPORTANT!
# This gist has been transformed into a github repo
# You can find the most recent version there:
# https://github.com/Neo23x0/auditd
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
@juanmiret
juanmiret / init.lua
Last active July 23, 2018 18:18
Simple Vi mode with Karabiner-elements and Hammerspoon
local module = {}
module.debugging = false -- whether to print status updates
local eventtap = require "hs.eventtap"
local event = eventtap.event
local inspect = require "hs.inspect"
local keyHandler = function(e)
local watchFor = {

Chromium OS ft. Docker

Chromium OS is cool. Chromium OS with crouton is cooler. Chromium OS with Docker is even cooler. This is specifically a guide for the HP Chromebook 13 G1 (aka HP Spyder Chromebook), but I can't think of any reason it wouldn't work with other devices. The Chromebook Pixel 2 (2015), for example...as you'll notice, the guide this was forked from assumed that machine.

  1. Create a build environment
  2. Customize the kernel
  3. Build Chromium OS
  4. Flash Chromium OS to USB
  5. Install Chromium OS
@charlesroper
charlesroper / cf-update-dns-txt.ps1
Last active December 29, 2021 20:53
PowerShell script to update the _acme-challenge TXT entry on CloudFlare
# See https://github.com/ebekker/ACMESharp/wiki/Quick-Start for background
# Could be enhanced by putting YOUR_CF_API_KEY and YOUR_EMAIL in environment vars
# Usage:
# > cf-update-dns-txt.ps1 -Domain example.com -Value vNx_fpLgvq0l4rqSATuxhxl9pa155SoeKvNZ98AFB_4
param( [string]$domain, [string]$value )
$headers = @{
"X-Auth-Key" = "YOUR_CF_API_KEY"
"X-Auth-Email" = "YOUR_EMAIL"
"Content-Type" = "application/json"