Skip to content

Instantly share code, notes, and snippets.

View SaifRehman's full-sized avatar
🎯
Focusing

SaifRehman SaifRehman

🎯
Focusing
  • IBM
  • Dubai
View GitHub Profile
@snowyu
snowyu / ts-quasar-cli.md
Created September 8, 2018 13:19
Add the typescript supports to quasar framework

Note: This guide applies to the project created by quasar-cli.

First install typescript and ts-loaderpackages in your project.

npm i -D typescript ts-loader

Then modified the quasar.conf.js file in your project:

@kordless
kordless / ipfs.yml
Last active September 13, 2022 06:28
Deploy IPFS on Kubernetes
apiVersion: v1
kind: Service
metadata:
name: ipfs
spec:
type: NodePort
ports:
- name: ipfs
port: 8080
targetPort: 8080
@blasten
blasten / KMP.js
Last active February 11, 2024 04:04
String matching based on the KMP algorithm. This how `String.prototype.indexOf` is generally implemented.
// Construct a table with table[i] as the length of the longest prefix of the substring 0..i
function longestPrefix(str) {
// create a table of size equal to the length of `str`
// table[i] will store the prefix of the longest prefix of the substring str[0..i]
var table = new Array(str.length);
var maxPrefix = 0;
// the longest prefix of the substring str[0] has length
table[0] = 0;