Skip to content

Instantly share code, notes, and snippets.

View kafkadev's full-sized avatar
🏠
Working from home

Gokhan Celik kafkadev

🏠
Working from home
View GitHub Profile
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active October 26, 2025 02:00
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@kafkadev
kafkadev / cryptojs_base64_encrypt_decrypt.js
Created October 20, 2021 19:40 — forked from joecliff/cryptojs_base64_encrypt_decrypt.js
An example of base64 usage in cryptojs
var CryptoJS = require("crypto-js");//replace thie with script tag in browser env
//encrypt
var rawStr = "hello world!";
var wordArray = CryptoJS.enc.Utf8.parse(rawStr);
var base64 = CryptoJS.enc.Base64.stringify(wordArray);
console.log('encrypted:', base64);
//decrypt
var parsedWordArray = CryptoJS.enc.Base64.parse(base64);
@mkornatz
mkornatz / cf-worker.js
Last active July 25, 2025 08:27
Cloudflare Workers CORS Proxy (supports websockets)
// We support the GET, POST, HEAD, and OPTIONS methods from any origin,
// and allow any header on requests. These headers must be present
// on all responses to all CORS preflight requests. In practice, this means
// all responses to OPTIONS requests.
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET,HEAD,POST,OPTIONS",
"Access-Control-Max-Age": "86400",
}
@ggrey
ggrey / tsv
Created December 4, 2020 14:22
Question Answer Source Metadata SuggestedQuestions IsContextOnly Prompts QnaId
need to expose an application To expose your application hosted on a Web App or Virtual Machine you will need to submit a request for an Application Gateway entry. Please click [HERE](https://pgcloud.atlassian.net/wiki/spaces/CO/pages/738656294/How+to+Request+for+Application+Gateway+Setup+or+Modification+for+External+Facing+Applications) to follow the instructions to raise the request. d01cd46f-3253-4738-be14-d7a998e4594d-KB.tsv [] false [] 23
expose app To expose your application hosted on a Web App or Virtual Machine you will need to submit a request for an Application Gateway entry. Please click [HERE](https://pgcloud.atlassian.net/wiki/spaces/CO/pages/738656294/How+to+Request+for+Application+Gateway+Setup+or+Modification+for+External+Facing+Applications) to follow the instructions to raise the request. d01cd46f-3253-4738-be14-d7a998e4594d-KB.tsv [] false [] 23
setup public application To expose your application hosted on a We
@augedoo
augedoo / mongodb_driver
Created September 20, 2020 19:00
Database connnection
const mongodb = require("mongodb")
const MongoClient = mongodb.MongoClient;
let _db;
// Connect to the database
const mongoConnect = (cb) => {
MongoClient.connect(
//connection string here
{ useUnifiedTopology: true }
async.parallel([
function(callback) {
setTimeout(function() {
console.log('Task One');
callback(null, 1);
}, 200);
},
function(callback) {
setTimeout(function() {
console.log('Task Two');
@mjjimenez
mjjimenez / gist:129888bb656bae5dc308d6399a9c7302
Last active October 21, 2021 20:40
Springboard questions
[
{
"questionId": "C614B380-8DF9-11EA-AB12-0800200C9A66",
"question": "You want to be able to store application logs from your Kubernetes Cluster for more than a year to be able to analyze them and monitor frequency errors. What is your best option to stream and store logs?",
"subQuestion": "",
"domain": "cdmp-gcp-simulated-exam",
"difficulty": "medium",
"answers": {
"a": "Configure Cloud Logging for your cluster and do nothing because logs are stored forever.",
"b": "Use pubsub to send the logs to a subscriber and process them using DataProc",
@alsunseri
alsunseri / CloudShell_ssh_to_GCP_vm_instance.txt
Created March 4, 2020 19:45
SSH from GCP Cloud Shell to GCP vm instance
How to ssh from google cloudshell to google GCP VM instances
- even instances with blocked ssh and instances with no public IP address
Why is this different than using ssh from any other terminal?
A. The IP address of the cloudshell is not known in advance and the ranges are not published.
B. Changes to the /root/.ssh folder will be lost when the instance stops.
C. There is no way to add a tag to the cloudshell
D. The cloudshell has no Service Account but uses the identity of the person logging into the GCP web cloud console.
E. Tm GCP VM might not even have a public IP address and might be in a different subnet.