Skip to content

Instantly share code, notes, and snippets.

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

Khurram khrm

💭
Hello There!
View GitHub Profile
#!/bin/bash
####################################################################################
#
# File : deb_preins.sh
# Project: SonATA
# Authors: The SonATA code is the result of many programmers
# over many years
#
# Copyright 2011 The SETI Institute
#
#!/bin/bash
####################################################################################
#
# File : ubu_preins.sh
# Project: SonATA
# Authors: The SonATA code is the result of many programmers
# over many years
#
# Copyright 2011 The SETI Institute
#
@khrm
khrm / khrm.asc
Created August 8, 2011 02:42
Khrm's GPG key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)
mQINBE4/SZcBEADAlerlsCla67cUAKCL+5WK/hMTzsp0gwGLypMO61whByz4iRVp
J4HGCpyKjKSYrkz/NmKXpkHWhKuzN5pL4zLqtJu9wHLfg3S5EfUO4Pkw/wbXP8PD
QaeCvGJb7E6nweUDQIjpImuV2r8twj41HtM0e31MRSOXn0mtVIlXpuVh5iMccioT
ZnGCfFs/Kf9NtbiMZ8seXm4Z9CSp5FN6ckUXNr23Y/OZnYb9V9o7K/scHHqPDFor
ECcFqdGxaBP2cititEmnr43gPDDji/acZiK9v/ZNEnUGfgN0OQhTC5qwPMur1VTY
Qp+76YLnZ09uRfsDPP2L20qHJ5y3aHuNZsaNg2n2leG6PMO4w8UHzdHgcIRQA09Q
w1Dg/1OFIB3vOFjOJz1nXERZsCffrUl/azAGHYy8D2rsFsx6iam0JOO0hN5ZKO09
# vger-demo-xpol.tcl
# runpacketsend-dx-vger-xpol -> dx1000
exec runpacketsend-dx-vger-xpol.tcsh &
gets stdin start
act set type iftest
act set watchdogs off
act set delay 5
sched set dxtune user
sched set beam1 on
diff --git a/CppUnit/autogen.sh b/CppUnit/autogen.sh
new file mode 100755
index 0000000..7062615
--- /dev/null
+++ b/CppUnit/autogen.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# updates Makefile infrastructure
+
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 ++++++++++++
@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).
package main
import (
"fmt"
)
type Person struct {
name string
age int
}
@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')]]))"
apiVersion: v1alpha1
kind: EventListener
metadata:
name: my-el
spec:
serviceAccountName: "blah"
selector:
matchLabels:
handler: operator
---