Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# Workaround CVE-2019-5736 via patched runc provided by
# https://github.com/rancher/runc-cve
# The script does:
# 1) find "docker-runc" executable and docker version
# 2) download corresponding patched runc
# 3) dpkg-divert (ie "permanently move") pkg installed runc and replace it by 2)
#
# Run with "-n" for dry-run.
@optionalg
optionalg / USAGE.md
Created February 15, 2019 08:07 — forked from abeluck/USAGE.md
Ansible playbook for updating apt securely (CVE-2019-3462)

This only works on debian stretch (stable)

gpg --verify check-apt-update.sh.asc
ansible-playbook upgrade-apt.yml -i <YOURINV>

Thanks to @eighthave for original script.

Ref:

@optionalg
optionalg / flush-dns.sh
Created September 2, 2018 01:47 — forked from craigvantonder/flush-dns.sh
Flushing the DNS in Ubuntu 16.04
#!/bin/bash
# NB: First install nscd with sudo apt-get install nscd
# run this command to flush dns cache:
sudo /etc/init.d/dns-clean restart
# or use:
sudo /etc/init.d/networking force-reload
# Flush nscd dns cache:
sudo /etc/init.d/nscd restart

AWS 학습 링크집 시리즈

AWS 보안 관련 컨텐츠 모음집(bit.ly/secontents)

AWS 공식문서 중 보안에 관련된 자료들을 한글 자료 중심으로 정리한 페이지 입니다.

@optionalg
optionalg / linespace.sh
Created May 31, 2018 17:41 — forked from chrissimpkins/linespace.sh
linespace.sh
#!/bin/sh
# //////////////////////////////////////////////////////////////////////
#
# linespace.sh
# A shell script that modifies all .otf and .ttf fonts in the
# working directory to $PERCENT_UPM% UPM line spacing
# Copyright 2018 Christopher Simpkins
# MIT License
#
@optionalg
optionalg / opengrok.txt
Created May 21, 2018 15:40 — forked from justingarrick/opengrok.txt
Setup OpenGrok on Tomcat (/w LDAP) to Search SVN
These instructions are an amalgamation of those posted at http://jdevel.wordpress.com/2011/03/26/running-opengrok-on-windows/ and my own experience.
To setup OpenGrok on Windows running under Tomcat:
1. Download OpenGrok binary. Just go to OpenGrok Home and download the latest (0.10, currently) binary
2. Download ctags. Just go to ctags, download windows zip file and extract it somewhere.
3. Edit web.xml. You need to extract lib/source.war somewhere and modify WEB-INF/web.xml slightly. I’ve modified the CONFIGURATION param to point to my generated configuration.xml file(more about it later) and added SRC_ROOT and DATA_ROOT to point to folder with sources to index and folder that OpenGrok should keep it’s data in (I’m not sure if these two are needed if you pass in configuration.xml)
<context-param>
<param-name>CONFIGURATION</param-name>
<param-value>D:/GrokTest/configuration.xml</param-value>
@optionalg
optionalg / 01_export_aws_managed_policies.py
Created May 21, 2018 09:42 — forked from gene1wood/aws_iam_managed_policies_2019-02-12.json
Script to export all AWS IAM managed policies
import boto3
import json
client = boto3.client('iam')
paginator = client.get_paginator('list_policies')
response_iterator = paginator.paginate(Scope='AWS')
managed_policies = []
for response in response_iterator:
for policy in response['Policies']:
@optionalg
optionalg / aws_rss_feeds.xml
Created May 2, 2018 12:08 — forked from eerien/aws_rss_feeds.xml
AWS RSS Feeds OPML includes AWS Status, AWS Forum Announcements, AWS Blogs, AWS Partners, AWS News, AWS Release Notes and AWS Security Bulletins
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>AWS RSS Feeds</title>
</head>
<body>
<outline title="AWS Status" text="AWS Status">
<outline text="Amazon Mobile Analytics (N. Virginia) Service Status" title="Amazon Mobile Analytics (N. Virginia) Service Status" type="rss" xmlUrl="http://status.aws.amazon.com/rss/analytics-us-east-1.rss" htmlUrl="http://status.aws.amazon.com/" rssfr-favicon="http://status.aws.amazon.com/favicon.ico"/>
<outline text="Amazon AppStream (N. Virginia) Service Status" title="Amazon AppStream (N. Virginia) Service Status" type="rss" xmlUrl="http://status.aws.amazon.com/rss/appstream-us-east-1.rss" htmlUrl="http://status.aws.amazon.com/" rssfr-favicon="http://status.aws.amazon.com/favicon.ico"/>
<outline text="Auto Scaling (Tokyo) Service Status" title="Auto Scaling (Tokyo) Service Status" type="rss" xmlUrl="http://status.aws.amazon.com/rss/autoscaling-ap-northeast-1.rss" htmlUrl="http://status.a
@optionalg
optionalg / makeauthority.sh
Created March 13, 2018 17:26 — forked from richieforeman/makeauthority.sh
Issue Your Own Self-Signed S/MIME Certs with OpenSSL
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@optionalg
optionalg / blog_grid.py
Created February 6, 2018 10:15 — forked from mneedham/blog_grid.py
Spooky Author Identification - Grid search for VotingClassifier
import pandas as pd
from sklearn import linear_model
from sklearn.ensemble import VotingClassifier
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from sklearn.model_selection import GridSearchCV
from sklearn.naive_bayes import MultinomialNB
from sklearn.pipeline import Pipeline
Y_COLUMN = "author"
TEXT_COLUMN = "text"