Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Blazing a trail the likes of which has never been seen.

Rory Bramwell rbramwell

🚀
Blazing a trail the likes of which has never been seen.
View GitHub Profile
View Good-CONTRIBUTING.md-template.md

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@aj-jester
aj-jester / sorted_json.rb
Last active Jan 18, 2018
Puppet parser function that takes unsorted hash and outputs sorted JSON object.
View sorted_json.rb
#
# LICENSE: https://gist.github.com/aj-jester/e0078c38db9eb7c1ef45
#
require 'json'
module JSON
class << self
@@loop = 0
def sorted_generate(obj)
@rbramwell
rbramwell / README.md
Last active Aug 29, 2015 — forked from joyrexus/README.md
REST basics
View README.md

Basics of RESTful API design

  • Your API should be designed around the idea of resources.

  • Resources represent things (nouns) and not behaviors (verbs).

  • Each resource should have a canonical/unique url (api/users/bill, api/users/mary).

  • Return all resource properties in the return payload.

@aembleton
aembleton / docx2md.md
Last active Jan 22, 2021 — forked from vdavez/docx2md.md
Convert a Word Document into MD
View docx2md.md

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@zuphilip
zuphilip / zotero-libreoffice.md
Last active Jun 11, 2020
Zotero in Word/LibreOffice
View zotero-libreoffice.md

It seems essential to use a 32-bit Java version and not 64-bit Java version for the LibreOffice integration of Zotero. However, it is possible to install several Java version on the same machine and to choose in LibreOffice one version to use (Tools-->Options-->Advanced):

Choose Java version in LibreOffice

Windows

On Windows 10 with LibreOffice 5 the autoinstaller does not work. Thus, one has to manually install

View MyRetryPolicy.scala
class MyRetryPolicy(maxRetries: Int) extends RetryPolicy {
override def onReadTimeout(statement: Statement,
cl: ConsistencyLevel,
requiredResponses: Int,
receivedResponses: Int,
dataRetrieved: Boolean,
nbRetry: Int): RetryDecision = {
if (nbRetry < maxRetries) RetryDecision.retry(cl) else RetryDecision.rethrow()
}
View ConfigureWsMan.ps1
# Get a list of trusted hosts
Get-Item WSMan:\localhost\Client\TrustedHosts
# Note that these commands don't create a list of trusted hosts, it simply replaces the trusted host with what you set via the command. If you need to add multiple hosts, they need to be comma seperated
# Trust all computers in a domain
Set-Item WSMan:\localhost\Client\TrustedHosts *.contoso.com
# Turst a single machine
Set-Item WSMan:\localhost\Client\TrustedHosts -Value myserver
@voxxit
voxxit / USING-VAULT.md
Last active Apr 19, 2021
Consul + Vault + MySQL = <3
View USING-VAULT.md
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@masonforest
masonforest / Dockerfile
Last active Mar 18, 2020
Test Drive Your Dockerfiles with RSpec and ServerSpec
View Dockerfile
FROM ubuntu:14.04
MAINTAINER Mason Fischer <mason@thoughtbot.com>
RUN apt-get update && apt-get install -y nodejs
View nxfetch.sh
#!/bin/bash -e
# Argument = -h -v -i groupId:artifactId:version -c classifier -p packaging
#shopt -o -s xtrace
# Define Nexus Configuration
NEXUS_BASE=http://repository.example.com:8081/nexus #this URL shouldn't end in a /
REST_PATH=/service/local
ART_REDIR=/artifact/maven/redirect