Skip to content

Instantly share code, notes, and snippets.

View markpbaggett's full-sized avatar

Mark Baggett markpbaggett

View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active May 24, 2024 04:20
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

@Jaskaranbir
Jaskaranbir / github_release_script.sh
Last active March 16, 2023 14:00
Shell script to create GitHub releases with automatically generated changelogs (using github-changelog-generator).
#!/bin/bash
# ===> Set these variables first
branch="$GIT_BRANCH"
# Example: "Jaskaranbir/MyRepo"
repo_slug="$TRAVIS_REPO_SLUG"
token="$GITHUB_TOKEN"
version="$TRAVIS_TAG"
# An automatic changelog generator
@Blake-
Blake- / gist:538c8d7cc7ade39efc372a3e3e190873
Last active June 1, 2023 14:52
Update all tables in ArchivesSpace to force a reindex
This will force a solr reindex w/o needing to clear out the /data/ directory
UPDATE accession set system_mtime = NOW();
UPDATE agent_contact set system_mtime = NOW();
UPDATE agent_corporate_entity set system_mtime = NOW();
UPDATE agent_family set system_mtime = NOW();
UPDATE agent_person set system_mtime = NOW();
UPDATE agent_software set system_mtime = NOW();
update archival_object set system_mtime = NOW();
update assessment set system_mtime = NOW();
@Kmaschta
Kmaschta / Makefile
Created December 12, 2017 16:49
Artifact deployment example
.PHONY: build
TAG ?=
SERVER ?= staging-server
install:
npm install
start:
node --require reify server.js
@valeriomazzeo
valeriomazzeo / github_release.rb
Created July 5, 2017 21:24
Creates or update a GitHub release for the given tag name
#!/usr/bin/env ruby
require 'optparse'
require 'octokit'
options = {}
OptionParser.new do |opt|
opt.on('-s', '--secret SECRET', 'GitHub access token') { |o| options[:secret] = o }
opt.on('-r', '--repo-slug REPO_SLUG', 'Repo slug. i.e.: apple/swift') { |o| options[:repo_slug] = o }
opt.on('-c', '--changelog-file CHANGELOG_FILE', 'Changelog path') { |o| options[:changelog_file] = o }

First suggestion:

src/
  <pkgname>.nim
tests/
docs/
<pkgname>.nimble # with srcDir = "src"

library with single module

@IanHopkinson
IanHopkinson / lxml_examples.py
Created November 24, 2015 19:42
Examples of xpath queries using lxml in python
#!/usr/bin/env python
# encoding: utf-8
import lxml.etree
import lxml.html
import requests
xml_sample = """<?xml version="1.0" encoding="UTF-8"?>
<foo:Results xmlns:foo="http://www.foo.com" xmlns="http://www.bah.com">
<foo:Recordset setCount="2">
@patrickfuller
patrickfuller / pre-commit
Last active September 18, 2019 16:29
SCSS compilation pre-commit hook
#!/bin/bash
# When SCSS is changed in a commit, this compiles and commits the affected css.
# This script assumes a project directory of the form:
# main.scss
# main.css
# scss
# | file_1.scss
# | ...
# | file_n.scss
@iangreenleaf
iangreenleaf / gist:b206d09c587e8fc6399e
Last active May 5, 2024 14:52
Rails naming conventions

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

@roachhd
roachhd / README.md
Last active May 22, 2024 09:24
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄