Skip to content

Instantly share code, notes, and snippets.

View techtocore's full-sized avatar
💭
I may be slow to respond.

Akash Ravi techtocore

💭
I may be slow to respond.
View GitHub Profile
# SLURM Build and Installation script for Redhat/CentOS/Rocky EL8
# in case of repo access issues uncomment the following lines
# sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
# sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
export VER=22.05.2 # SLURM version
# build tools and essentials
@techtocore
techtocore / python_funda
Last active March 7, 2021 04:01
Common Python Operations (for transitioning from another language)
--------------------------------------------
# Collections
--------------------------------------------
# list [..], tuple (..), set {..}, dict {'a':'b'}
arr = list(map(int, input().split())) # Inputs list from space separated str
arr.insert(1, "orange") # arr[1] will be 'orange'
del arr[1] # removes arr[1] - also works for dict
arr.sort() # no need to re-assign
@techtocore
techtocore / OCI-architect-associate-notes.txt
Created November 26, 2020 06:06
Notes for Oracle Cloud Infrastructure 2019 Architect Associate certification
Availability Domain:
Gen 2 - Non-oversubscribed network; no noisy neighbors
Off-box network virtualization
Region -> AD -> 3 fault domain per AD
----
IAM
@techtocore
techtocore / async-await.js
Last active May 12, 2020 12:06
async-await Example
function slowFunction() {
return new Promise((resolve, reject) => {
// This is where your API call would happen. Wherever you are able to access the required value, call resolve(VALUE)
setTimeout(() => {
resolve({
'key': 'ans'
});
}, 2000);

Keybase proof

I hereby claim:

  • I am techtocore on github.
  • I am akashravi (https://keybase.io/akashravi) on keybase.
  • I have a public key whose fingerprint is 3CD6 A05C 170A A4AC 38AC 825F 0E0A 8797 F049 B10B

To claim this, I am signing this object:

<script>alert(123);</script>
<ScRipT>alert("XSS");</ScRipT>
<script>alert(123)</script>
<script>alert("hellox worldss");</script>
<script>alert(�XSS�)</script>
<script>alert(�XSS�);</script>
<script>alert(�XSS�)</script>
�><script>alert(�XSS�)</script>
<script>alert(/XSS�)</script>
<script>alert(/XSS/)</script>
@techtocore
techtocore / jwt.js
Last active September 3, 2019 10:10
var jwt = require('jsonwebtoken'); // used to create, sign, and verify tokens
var config = require('../../config'); // get our config file
var User = require('./../user/User');
async function check(req) {
var token = req.headers['authorization'];
if (!token || !token.split(' ')[1])
throw new Error('No token provided');
var decoded = await jwt.verify(token.split(' ')[1], config.secret);