Skip to content

Instantly share code, notes, and snippets.

@TheYkk
TheYkk / README.md
Created September 4, 2018 10:24
Deobfuscate free version of JavascriptObfuscator.com

Simple Javascript deobfuscator

Aims to deobfuscate the result of JavascriptObfuscator free version.

Run

To tun the script, you should have had node.js installed first. Requires node.js and following npm modules:

  • esprima
@TheYkk
TheYkk / Vagrantfile
Created December 10, 2018 14:32 — forked from gokhansengun/Vagrantfile
Vagrantfile used in Istanbul Coders - Kubernetes Introduction Meetup
# -*- mode: ruby -*-
# vi: set ft=ruby :
K8S_DEV_BOX_NAME = "gsengun/k8s-dev-box"
K8S_DEV_BOX_VERSION = "17.12.27"
MASTER_NODE_IP_START="172.27.44.20"
WORKER_NODE_IP_START="172.27.44.10"
JOIN_TOKEN="abcdef.1234567890123456"
@TheYkk
TheYkk / kubia.yaml
Created May 3, 2019 22:44 — forked from DevInTheTrenches/kubia.yaml
Simple Hands-on Introduction to K3S - Lightweight Kubernetes
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: whoareyou-deployment
namespace: default
spec:
replicas: 2
selector:
matchLabels:
app: whoareyou
@TheYkk
TheYkk / cleanup.sh
Created May 16, 2019 18:17 — forked from superseb/cleanup.sh
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
#!/bin/bash
if [[ $DEBUG == "true" ]]; then
set -x
fi
# Check if FQDN is given
if [ -z "$1" ]; then
echo "Usage: $0 rancher.yourdomain.com"
exit 1
fi
@TheYkk
TheYkk / lets-encrypt-wildcard-certs-using-azure-dns-on-aks.md
Created July 15, 2019 15:59 — forked from marcopaga/lets-encrypt-wildcard-certs-using-azure-dns-on-aks.md
Let's encrypt wildcard TLS certificates for Azure DNS using cert-manager on AKS (Azure Kubernetes Service)

This gist will guide you through the setup of a wildcard Let's encrypt TLS certificate.

Let's encrypt

Let’s encrypt is one of a new kind of Certificate Authority. You can get a TLS certificate from them for your website free of charge and without any manual overhead. These certificates are trusted in most browsers that are out there and will show up as valid. Instead of sending Mails or even paper around you can call an API and prove your domain ownership with simple challenges. Basically you call the API with a hostname or domain name you need a TLS certificate for and you get back a challenge string that you need to put in a well known location on your http host or as a txt record in your dns system.

The little helper for Kubernetes: Cert-Manager

You can find many clients that manage the proces

var mongoose = require("mongoose");
var SonicChannelIngest = require("sonic-channel").Ingest;
var MessageModel = mongoose.model("message", new mongoose.Schema({
session_id : String,
website_id : String,
type : String,
content : Object
}));
@TheYkk
TheYkk / README.md
Created August 12, 2019 15:08 — forked from denji/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
@TheYkk
TheYkk / worker.js
Created July 24, 2020 14:55 — forked from maxkostinevich/worker.js
Serverless Geolocation Service
/*
* Serverless Geolocation Service, hosted on Cloudflare Workers.
*
* Learn more at https://maxkostinevich.com/blog/serverless-geolocation
*
* (c) Max Kostinevich / https://maxkostinevich.com
*/
// https://gist.github.com/maephisto/9228207
@TheYkk
TheYkk / test.sh
Created February 1, 2021 10:28 — forked from developer-guy/test.sh
Display Kubernetes OpenAPI Spec
#!/usr/bin/env bash
set -e
# Proxy minikube to localhost on arbitrary port:
kubectl proxy --port=8080 &
sleep 3
# Now swagger.json is available at localhost:12345/openapi/v2
# Save to /tmp/temp/json and serve with e.g. docker swagger-ui container
curl http://localhost:8080/openapi/v2 > /tmp/temp.json
docker container run -d -p 9999:8080 -e SWAGGER_JSON=/var/specs/temp.json -v /tmp/temp.json:/var/specs/temp.json swaggerapi/swagger-ui