Skip to content

Instantly share code, notes, and snippets.

View josdotso's full-sized avatar
🎯
Focusing

Joshua Dotson josdotso

🎯
Focusing
View GitHub Profile
@sfc-gh-mharris
sfc-gh-mharris / Load_ragged_TSV_External_Table.sql
Created March 30, 2023 00:10
An example of how to load an delimited file with ragged columns (or tailer). Loads view external table
/* Original Data: test_data.txt
col1~col2~col3~col4~col5
a1~b1~c1~d1~e1
a2~b2~c2~d2~e2
a3~b3~c3~d3~e3
a4~b4~c4~d4~e4
a5~b5
*/
@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active May 19, 2024 18:37
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@lsloan
lsloan / vagrant_host.md
Last active September 21, 2022 13:53
Vagrant: host IP address from guest perspective

Unless specified otherwise in Vagrantfile, the IP address of the host (the computer running Vagrant) from the perspective of the guest (the VM being run by Vagrant) is: 10.0.2.2

If that IP address doesn't work, then examination of Vagrantfile should reveal directives that changed it from its default value.

If an IP address can't be found in Vagrantfile, then the following command will probably reveal it:

route -A inet
@orjan
orjan / checkout-pr.md
Last active August 7, 2020 21:40
Checkout pull request in Bitbucket server

Checking out pull requests in Bitbucket

/.git/config
[remote "origin"]
    url = ssh://git@git.dev.viaeuropa.int:7999/brikks/brikks.git
    fetch = +refs/heads/*:refs/remotes/origin/*
    fetch = +refs/pull-requests/*/from:refs/remotes/origin/pull-requests/*
    fetch = +refs/pull-requests/*/merge:refs/remotes/origin/pull-requests-merge/*
@rpgreen
rpgreen / gist:c127aa4ebbcaa9026be7
Last active March 10, 2023 02:10
Swagger file demonstrating two ways to achieve HTTP redirects using API Gateway and Lambda
---
swagger: "2.0"
basePath: "/test"
schemes:
- "https"
paths:
/lambdaredirect-default:
get:
produces:
- "application/json"
@joshbode
joshbode / LICENSE.md
Last active April 5, 2024 14:52
YAML Loader with include constructor (Python 3)

MIT License

Copyright (c) 2018 Josh Bode

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@bot11
bot11 / lan.conf
Created June 2, 2015 10:52
openipmi_lan.conf
# A configuration file for lanserv or ipmi_sim to configure the various
#communication parameters for the device.
# This is a name used to identify this instance, and used to create
# the default name of the emulator startup command file and eventually # the storage facility for permanent storage.
name "mybmc"
#
# Work on the BMC first
set_working_mc 0x20
This document describes about installation and configuration of IPMI simulator.
We need: qemu-kvm, OpenIPMI, OpenIPMI-tools
1) Install the qemu-kvm. We need the qemu, which have the IPMI pacthes.
Use the source https://github.com/cminyard/qemu/tree/stable-2.2-ipmi
./configure, make and make install
2) Download the OpenIPMI libraries, from http://sourceforge.net/projects/openipmi/
Follow the process documented in lanserv/README.vm
./configure --prefix=/opt/openipmi/usr --sysconfdir=/opt/openipmi/etc \
--with-perlinstall=/opt/openipmi/usr/lib/perl \
@pmarreck
pmarreck / fibonacci.exs
Last active April 28, 2020 02:37
Enumerative and recursive (via TCO) fibonacci in Elixir, with timings
defmodule Fib do
def run_recursive(num) do
run_recursive(num, 0, 1)
end
# FYI: tail call optimized
def run_recursive(0, res, _), do: res
def run_recursive(n, res, nxt) when n > 0 do
run_recursive(n-1, nxt, res+nxt)
end
@ambakshi
ambakshi / docker-direct-lvm.sh
Last active January 14, 2021 13:15
docker-direct-lvm
#!/bin/bash
set -e
## striping seems to break docker
#STRIPE="-i2 -I64"
#DEVS="/dev/xvdf /dev/xvdg"
DEVS="$1"
if [ -z "$DEVS" ]; then
echo >&2 "Specify which block devices to use"
exit 1