Skip to content

Instantly share code, notes, and snippets.

View khrm's full-sized avatar
💭
Hello There!

Khurram khrm

💭
Hello There!
View GitHub Profile
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tekton-logs
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
@khrm
khrm / ReleaseNote.md
Last active August 3, 2020 14:33
Release Note

Changes

Features

  • Add CEL function to parse YAML (#636)

This PR will add a CEL function named parseYAML that can parse a YAML string into a map of strings to dynamic values Syntax: .parseYAML() -> map<string, dyn>

  • Expose the incoming request URL to CEL expressions (#647)
@khrm
khrm / gist:9534e7685696674093b30deb98994b5b
Created July 31, 2020 16:31
log create-draft-triggers-release
2020-07-31 21:52:08 ⌚ localhost in ~/go/src/github.com/tektoncd/triggers
± |master → origin {1} U:1 ?:1 ✗| → echo ${GIT_RESOURCE_NAME}
tekton-triggers-git-v0-7-0
2020-07-31 21:52:11 ⌚ localhost in ~/go/src/github.com/tektoncd/triggers
± |master → origin {1} U:1 ?:1 ✗| → echo ${VERSION_TAG}
v0.7.0
2020-07-31 21:52:25 ⌚ localhost in ~/go/src/github.com/tektoncd/triggers
± |master → origin {1} U:1 ?:1 ✗| → echo ${PREVIOUS_VERSION_TAG}
apiVersion: v1alpha1
kind: EventListener
metadata:
name: my-el
spec:
serviceAccountName: "blah"
selector:
matchLabels:
handler: operator
---
apiVersion: v1alpha1
kind: EventListener
metadata:
name: my-el
spec:
serviceAccountName: "blah"
selector:
matchLabels:
handler: operator
---
apiVersion: v1alpha1
kind: EventListener
metadata:
name: my-el
spec:
serviceAccountName: "blah"
selector:
matchLabels:
handler: operator
---
@khrm
khrm / generateDeps
Created September 25, 2019 19:24
Generate Provided Bundle from vendor/modules.txt for rpm spec
python -c "ver = None;
def version(line): global ver; ver = line.split()[2]; return '';
print '\n'.join(filter(None,[line for line in ['Provides: bundled(golang({})) = {}'.format(line.rstrip('\n'), ver) if line[0] != '#' else version(line.rstrip('\n')) for line in open('vendor/modules.txt')]]))"
package main
import (
"fmt"
)
type Person struct {
name string
age int
}
@khrm
khrm / User Authentication Guidelines.md
Last active March 9, 2016 13:18
Guideline for designing and building authentication system

User Authentication Guidelines:

  1. Store the passwords after hashing. (Does anyone forget it nowadays?)
  2. Invalidate old hashes.
  3. Use scrypt or bcrypt algortithm for hashing password. Hashing time cost should be around 150ms.
  4. Use hmac after hashing to store password.
  5. Your salt should also be pseudorandom.
  6. Have time/count limit on login attempts.
  7. If using tokens, then don't store them in the server. (I am using jwt. If you really need to store, then don't forget hash + hmac).
Auto-merging scripts/Makefile.am
Merge made by recursive.
CppUnit/autogen.sh | 21 ++
CppUnit/configure.ac | 44 +++
CppUnit/configure.gnu | 4 +
Installation/32/fed_preins.sh | 189 ++++++++++++
Installation/32/ubu_preins.sh | 184 +++++++++++
Installation/cen5_preins.sh | 298 ++++++++++++++++++
Installation/check.sh | 39 +++
Installation/deb_preins.sh | 195 ++++++++++++