This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class AnagramWithAlternateVowel_3 { | |
private final int mod = 1000000007; | |
private HashMap<Integer, Integer> factMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class AnagramWithAlternateVowel_1 { | |
private HashMap<Character, Integer> vowels ; | |
private HashMap<Character, Integer> consonents ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference: https://stackoverflow.com/questions/22008193/how-to-list-download-the-recursive-dependencies-of-a-debian-package | |
# download the dependencies into a directory | |
apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances <your-package-here> | grep "^\w" | sort -u) | |
# package them | |
dpkg-scanpackages . | gzip -9c > Packages.gz | |
# copy all downloaded *.deb and Packages.gz from previous step to your target machine | |
# create deb on target system without internet access |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// No Security | |
{ | |
"rules": { | |
".read": true, | |
".write": true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SOURCE: https://stackoverflow.com/questions/47572752/calling-a-middleware-from-within-a-middleware-in-nodejs-expressjs | |
const wrappingMiddleware = (req, res, next) => { | |
try { | |
if (process.env.SOME_VAR === 'true') { | |
let externalMiddleware = logger({ | |
custom:true | |
}); | |
return externalMiddleware(req,res,next); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq --arg variable "$variable" -s '.[0] * .... "'$variable'" ... ' other-input-to-slurp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get-childitem logs -path .\ -directory -recurse | remove-item -confirm:$false -recurse -force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first, download cntlm and setup proxy on local | |
minikube start --docker-env http_proxy=http://10.0.2.2:3128 --docker-env https_proxy=http://10.0.2.2:3128 --docker-env no_proxy=no_proxy=localhost,127.0.0.1,$YOUR_DOCKER_REPOSITORY$,10.160.170.30,10.0.0.0/24,192.168.99.0/24 | |
# 10.0.2.2 is the gateway IP of minikube virtual box. "route -n" can be used to find out gateway. |