Skip to content

Instantly share code, notes, and snippets.

View davdunc's full-sized avatar

David Duncan davdunc

View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active May 22, 2024 14:41
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@mateobur
mateobur / CloudFormationTemplateOpenShift.yaml
Created January 23, 2018 22:19
CloudFormation Template OpenShift
AWSTemplateFormatVersion: '2010-09-09'
Metadata: {}
Parameters:
###########
KeyName:
Description: The EC2 Key Pair to allow SSH access to the instance
Type: 'AWS::EC2::KeyPair::KeyName'
AvailabilityZone:
Description: Availability zone to deploy
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@niksumeiko
niksumeiko / git.migrate
Last active May 13, 2024 15:34
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@k14i
k14i / setup_cachefilesd.sh
Last active December 17, 2015 18:09
cachefilesd properly works with Gluster's NFS, not only with kernel's one. It would be a waste not to match them up :-) #glusterfs https://twitter.com/keithseahus/status/337902379762601984
#!/usr/bin/env bash
NFS_SERVER=192.168.1.100
MOUNT_POINT=/mnt/nfs
yum install -y cachefilesd
if test `grep 'SELINUX=disabled' /etc/selinux/config > /dev/null; echo $?` -ne 0; then
sed -i 's/^secctx/#secctx/g' /etc/cachefilesd.conf
fi
chkconfig cachefilesd on
@learncfinaweek
learncfinaweek / gist:4121338
Created November 20, 2012 21:35
Document Handling - Spreadsheets

When creating a website that generates reports, having the ability to generate Excel spreadsheets is a great feature to offer users. Allowing people to provide an Excel file of data rather than forcing them to manually enter everything into your system is also a great feature for users. ColdFusion allows for both the creation and reading of spreadsheets.

ColdFusion offers the ability to use tags and functions to manipulate spreadsheets. The cfspreadsheet tag is best used when reading in a spreadsheet; the spreadsheet functions are best used when manipulating the spreadsheet. There is the SpreadsheetRead function available to you, but it does not return the data contained in the spreadsheet. For this section, we will use the cfspreadsheet tag to read in data, but will use the spreadsheet functions for creation and manipulation.

Reading a Spreadsheet

@taylor
taylor / git-ignore
Created March 23, 2012 04:56
Git script for creating and modifying .gitignore files
#!/bin/bash
## REPO -- https://github.com/github/gitignore
## DOWNLOADS
DL_IGNORE_URL="https://raw.github.com/github/gitignore/master/"
IGNORE_TREE_URL="https://api.github.com/repos/github/gitignore/git/trees/master"
CACHE_IGNORE_LIST="$HOME/.cache/gitignore_list"
CACHE_IGNORE_NAMES="$HOME/.cache/gitignore_list_names"
@peo3
peo3 / setup_lxc_rootfs_fedora15.sh
Created August 12, 2011 14:52
How to boot up Fedora 15 with systemd inside Libvirt LXC
#!/bin/sh
# Setup a rootfs of Fedora 15 for libvirt lxc
#
# The rootfs is based on http://download.openvz.org/template/precreated/fedora-15-x86_64.tar.gz
#
# See also
# - http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg01707/lxc-fedora.in
if [ $# != 1 ]; then