Skip to content

Instantly share code, notes, and snippets.

@tkrisztian95
tkrisztian95 / Minikube-Kubectl-Fun.ps1
Last active March 4, 2022 10:12
A PowerShell scipt for simplify "minikube kubectl --" in case alias won't works.
function kubectl() {
minikube kubectl -- @args
}
@tkrisztian95
tkrisztian95 / docker-compose.yml
Created December 4, 2020 10:47
A simple Portainer CE docker compose
version: '3.8'
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer-server
restart: always
ports:
- "8000:8000" #Agents
- "9000:9000" #UI
@tkrisztian95
tkrisztian95 / wsl_install_node.md
Last active September 22, 2020 19:18 — forked from micahgodbolt/wsl_install_node.md
WSL install Node

The apt-get version of node is incredibly old, and installing a new copy is a bit of a runaround.

So here's how you can use NVM to quickly get a fresh copy of Node on your new Bash on Windows install

//switch to root
$ sudo su

//get NVM
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
@tkrisztian95
tkrisztian95 / localbranchname.sh
Created August 27, 2019 10:05
Jenkins set GIT_BRANCH_LOCAL env without origin
git_branch_local=$(echo $GIT_BRANCH | sed -e "s|origin/||g")
GIT_BRANCH_LOCAL=$git_branch_local
@tkrisztian95
tkrisztian95 / default.conf
Last active May 11, 2024 20:40
Nginx server JSON file as an API response
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www;
location /api/endpoint {
default_type application/json;
index apiResponse.json;
alias /var/www/;
}
@tkrisztian95
tkrisztian95 / docker-compose-mongodb-with-nosqlclient.yml
Last active June 4, 2022 06:53
Docker compose MongoDB with Nosqlclient web interface (basic auth)
version: '2'
services:
mongo:
image: mongo:latest
hostname: mongodb
restart: always
ports:
- 27017:27017
@tkrisztian95
tkrisztian95 / XmlUtils.java
Created July 2, 2019 09:48
Transform XML string by XSLT
public class XmlUtils {
public static String XsltTransform(String xml, String xslt) throws TransformerException {
Source xsltSource = new StreamSource(new StringReader(xslt));
Source xmlSource = new StreamSource(new StringReader(xml));
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(xsltSource);
//create a StringWriter for the output
StringWriter outWriter = new StringWriter();
StreamResult result = new StreamResult(outWriter);