Skip to content

Instantly share code, notes, and snippets.

@orsius
orsius / pip.conf
Created April 19, 2023 14:44 — forked from bryanveloso/pip.conf
Sample pip configuration file.
[global]
default-timeout = 60
respect-virtualenv = true
download-cache = /tmp
log-file = /tmp/pip-log.txt
[install]
find-links =
http://pypi.pinaxproject.com
http://pypi2.pinaxproject.com
@orsius
orsius / mongodb-ssl.sh
Created August 11, 2021 09:26 — forked from kevinadi/mongodb-ssl.sh
Script to create self-signed CA certificates, server certificates, and client certificates for testing MongoDB with SSL
#!/bin/sh
# Generate self signed root CA cert
openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=root/CN=`hostname -f`/[email protected]"
# Generate server cert to be signed
openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=server/CN=`hostname -f`/[email protected]"
# Sign the server cert
@orsius
orsius / README-Template.md
Created July 2, 2019 11:44 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@orsius
orsius / eng_ii_remove_trailing_percent.txt
Created June 4, 2019 07:10 — forked from djptek/eng_ii_remove_trailing_percent.txt
iterate over all properties and remove trailing % symbols
# create a pipline using painless to remove trailing "%" symbols
PUT _ingest/pipeline/remove_percent_symbols
{
"description": "iterate over all properties and remove trailing % symbols",
"processors": [
{
"script": {
"source": """
void traverse(Map o) {
for (String childKey : o.keySet()) {
@orsius
orsius / .gitignore
Created October 24, 2018 10:48 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@orsius
orsius / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console