Skip to content

Instantly share code, notes, and snippets.

Avatar
📞
call me on my shell phone

Jess Frazelle jessfraz

📞
call me on my shell phone
View GitHub Profile
@jessfraz
jessfraz / boxstarter.ps1
Last active Apr 3, 2021
Boxstarter Commands for a new Windows box.
View boxstarter.ps1
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@jessfraz
jessfraz / proposal.md
Created Feb 3, 2017
High-Level Security Profile Generator
View proposal.md

High-Level Security Profile Generator

(originally from my proposal on https://github.com/docker/docker/issues/17142#issuecomment-148974642 but generic)

The profile would generate artificats of an apparmor profile and seccomp filters.

Obviously doesn't have to be toml since that's super hipster :p

Assumptions

  • no one is going to sit and write out all the syscalls/capabilities their app needs
  • automatic profiling would be super cool but like aa-genprof it is never
@jessfraz
jessfraz / include.toml
Last active Nov 20, 2020
GitHub asciidoc mishaps
View include.toml
[[includes]]
name = "thing"
@jessfraz
jessfraz / Dockerfile.jessie
Last active Apr 26, 2020
testing seccomp
View Dockerfile.jessie
FROM debian:jessie
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
e2fsprogs \
init-system-helpers \
iptables \
libapparmor1 \
libltdl7 \
@jessfraz
jessfraz / j3ss.co.conf
Created Oct 1, 2016
nginx go-get vanity urls
View j3ss.co.conf
server {
....
location ~ ^/x/(.*) {
if ($args = "go-get=1") {
add_header Content-Type text/html;
return 200 '<meta name="go-import" content="$host/x/$1 git https://github.com/jessfraz/$1.git">';
}
return 302 https://github.com/jessfraz/$1;
}
@jessfraz
jessfraz / Dockerfile
Created Dec 28, 2018
Scrape CIA public PDF files
View Dockerfile
FROM python:2-alpine
RUN apk add --no-cache \
gcc \
libxml2-dev \
libxslt-dev \
musl-dev
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/include/libxml2
ENV C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/include/libxml2
View freeze.md

Freezer cgroup FTW

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.

@jessfraz
jessfraz / go-release-stats.md
Last active Mar 9, 2019
stats on the go 1.7 release for fun
View go-release-stats.md

Setup:

# set CONTRIBUTORS file to mailmap to remove duplicate emails for the same name
# see: https://git-scm.com/docs/git-shortlog#_mapping_authors
$ git config mailmap.file CONTRIBUTORS

Top 10 contributors (all):

@jessfraz
jessfraz / Dockerfile
Created Dec 28, 2018
Scrape best papers site
View Dockerfile
FROM python:2-alpine
RUN pip install \
beautifulsoup4 \
requests
COPY papers.py /usr/local/bin/
RUN chmod +x /usr/local/bin/papers.py
WORKDIR /root
View slack_send_pm.sh
#!/bin/bash
set -e
# Send a private message to someone on slack
# from the command line.
# Print a usage message and exit.
usage(){
local name=$(basename "$0")