Skip to content

Instantly share code, notes, and snippets.

View ptescher's full-sized avatar
🏠
Working from home

Patrick Tescher ptescher

🏠
Working from home
View GitHub Profile
@ptescher
ptescher / meta.yaml
Last active December 11, 2019 22:46
Che Rust Plugin
apiVersion: v2
publisher: ptescher
name: rust-vscode-ext
version: 0.1.0
type: VS Code extension
displayName: Rust
title: Rust
description: Rust language server
icon: https://rust-lang.gallerycdn.vsassets.io/extensions/rust-lang/rust/0.7.0/1571145643182/Microsoft.VisualStudio.Services.Icons.Default
category: Language
@ptescher
ptescher / erc712_example.js
Created August 14, 2019 22:54
ERC 712 Example
const msgParams = {
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
@ptescher
ptescher / Dockerfile
Last active October 30, 2018 20:27
OpenShift Jenkins Slave Image for Ruby 2.5
FROM openshift/jenkins-slave-base-centos7
ENV RUBY_MAJOR_VERSION=2 \
RUBY_MINOR_VERSION=5
ENV RUBY_VERSION="${RUBY_MAJOR_VERSION}.${RUBY_MINOR_VERSION}" \
RUBY_SCL_NAME_VERSION="${RUBY_MAJOR_VERSION}${RUBY_MINOR_VERSION}"
ENV RUBY_SCL="rh-ruby${RUBY_SCL_NAME_VERSION}"

Keybase proof

I hereby claim:

  • I am ptescher on github.
  • I am ptescher (https://keybase.io/ptescher) on keybase.
  • I have a public key ASB0YS9u6uHFU_TKpghivbJj6x3sBP6TWoTZN9kBRUf99Qo

To claim this, I am signing this object:

@ptescher
ptescher / README.md
Created June 20, 2018 19:16
OpenShift PostgreSQL with Slaves

Imagine you have a postgresql-ephemeral database set up via the following command:

oc new-app --name my-test-db --template postgresql-persistent -p POSTGRESQL_USER=mytestuser -p POSTGRESQL_PASSWORD=mytestpassword -p POSTGRESQL_DATABASE=mytestdb -p DATABASE_SERVICE_NAME=my-test-db

If the persistent volume is lost or corrupted all your data is gone. Furthermore all reads and writes must go through that single instance which can mean poor performance.

You could use a different database template like crunchy but you would need to migrate your config and data over.

pragma solidity 0.4.19;
/**
* Interface for required functionality in the ERC721 standard
* for non-fungible tokens.
*
* Author: Nadav Hollander (nadav at dharma.io)
*/
contract ERC721 {
// Function
@ptescher
ptescher / MintableNonFungibleToken.sol
Created January 26, 2018 21:15
Mintable Non-Fungible Token
pragma solidity 0.4.18;
/**
* Interface for required functionality in the ERC721 standard
* for non-fungible tokens.
*
* Author: Nadav Hollander (nadav at dharma.io)
*/
contract ERC721 {
// Function
{
"activityId": "aed2871b-4d99-4ace-bd14-efb836d7b888",
"api": {
"name": "com.pat2man.Friends",
"version": "1"
},
"sender": {
"userAddress": {
"userName": "patrickmacbook@pat2man.com"
}
Verifying my Blockstack ID is secured with the address 1JsZo2bU2tpgM29jRpRPMZ2wG8jS3dPYuE https://explorer.blockstack.org/address/1JsZo2bU2tpgM29jRpRPMZ2wG8jS3dPYuE
Verifying my Blockstack ID is secured with the address 1JsZo2bU2tpgM29jRpRPMZ2wG8jS3dPYuE https://explorer.blockstack.org/address/1JsZo2bU2tpgM29jRpRPMZ2wG8jS3dPYuE