Skip to content

Instantly share code, notes, and snippets.

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

ismail BASKIN ismailbaskin

🏠
Working from home
View GitHub Profile
@ismailbaskin
ismailbaskin / chillpixel-chatgpt-prompt-enhancer-generator-template.md
Created December 6, 2024 20:38 — forked from chillpixelfun/chillpixel-chatgpt-prompt-enhancer-generator-template.md
I am a cutting-edge text-2-image prompt enhancer and generator for Stable Diffusion. I provide users with highly specific and detailed prompts for generating or enhancing visual art in a concise, efficient manner.

########################### Create a new chat every time you use this script ###########################

Your goal is to generate a text-to-image prompt based on a user's input, detailing their desired final outcome for an image. The user will provide specific details about the characteristics, features, or elements they want the image to include. The prompt should guide the generation of an image that aligns with the user's desired outcome.

Generate a text-to-image prompt by arranging the following blocks in a single string, separated by vertical bars or pipe symbols:

Image Type: [Specify desired image type]

@ismailbaskin
ismailbaskin / step0.Dockerfile
Created January 20, 2021 22:41
Node.js Dockerfile Evolution
FROM node:12
WORKDIR /usr/src/app
COPY . .
RUN npm install
RUN npm run build
CMD [ "npm", "start" ]
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
name: webhook-cert
namespace: default
spec:
dnsNames:
- your-svc.default.svc
- your-svc.default.svc.cluster.local
issuerRef:
#!/usr/bin/env bash
## This script create necessary firewall rule based on validating and mutating webhooks for private GKE clusters.
## Usage : ./add_gcp_fw.sh [YOUR_GKE_CLUSTER_NAME]
set -e
CLUSTER=$1
validationg_svcs=$(kubectl get validatingwebhookconfigurations -ojson | \
jq -c '.items[].webhooks[].clientConfig.service | del(.path) | select(. != null)')
@ismailbaskin
ismailbaskin / stopPolicy.js
Created December 8, 2018 21:06
Shutdown GCP VMs
const Compute = require('@google-cloud/compute');
const compute = new Compute();
exports.stopPolicy = async () => {
const [vms] = await compute.getVMs({
filter: `labels.stop-policy:workhour`
});
await Promise.all( vms.map(vm => vm.stop()) );
@ismailbaskin
ismailbaskin / deployment.yaml
Last active November 30, 2018 17:37
Container-native LB
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: neg-demo-app # Label for the Deployment
name: neg-demo-app # Name of Deployment
spec: # Deployment's specification
replicas: 16
minReadySeconds: 60 # Number of seconds to wait after a Pod is created and its status is Ready
selector:
@ismailbaskin
ismailbaskin / index.js
Created July 9, 2018 20:51
GCP Pub/Sub to Slack message Cloud Function
const https = require('https');
const url = require('url');
const slackWebhookURL = 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX'; // CHANGE ME PLZ!
exports.gceAudit = (event, callback) => {
const msg = JSON.parse(Buffer.from(event.data.data, 'base64').toString());
const slackRequest = https.request({
hostname: url.parse(slackWebhookURL).hostname,
method: 'POST',
@ismailbaskin
ismailbaskin / f5_cookie_decoder.js
Created February 12, 2018 20:29
F5 cookie decoder
@ismailbaskin
ismailbaskin / meltdown.js
Created January 6, 2018 14:57
Javascript Meltdown POC code. You can read Chrome passwords
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+