Skip to content

Instantly share code, notes, and snippets.

View cy4n's full-sized avatar

Christian Kühn cy4n

View GitHub Profile
@cy4n
cy4n / delete-likes-from-twitter.md
Created February 21, 2023 08:31 — forked from aymericbeaumet/delete-likes-from-twitter.md
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
#!/usr/bin/python
import sys, binascii, base64, string, random
flag = sys.argv[1]
print(flag)
def toHex(m):
return binascii.hexlify(m)
@cy4n
cy4n / odc-maven-tree.py
Created November 30, 2021 16:33 — forked from jeremylong/odc-maven-tree.py
Poorly written code that maps the mvn dependency:tree output to the vulnerability information from ODC.
## mvn dependency:tree -DoutputFile=./target/tree.txt
## mvn org.owasp:dependency-check-maven:6.5.0:check -Dformats=HTML,JSON
## python3 odc-maven-tree.py ./target/tree.txt ./target/dependency-check-report.json > ./target/odc_tree.html
import json
import sys
import re
if len(sys.argv) != 3:
sys.exit("Missing path to dependency:tree report and/or the odc json report")
# Istio Workshop
kubectl run --rm -i -t kube-bench-master --image=aquasec/kube-bench:latest --restart=Never --overrides="{ \"apiVersion\": \"v1\", \"spec\": { \"hostPID\": true, \"nodeSelector\": { \"node-role.kubernetes.io/master\": \"\" }, \"tolerations\": [ { \"key\": \"node-role.kubernetes.io/master\", \"operator\": \"Exists\", \"effect\": \"NoSchedule\" } ] } }" -- master --version 1.12
@cy4n
cy4n / docker-compose.yml
Created October 11, 2018 19:27
docker-compose file to setup local influxdb and grafana for TESTING purposes
version: "3.2"
services:
grafana:
image: "grafana/grafana:latest"
container_name: grafana
ports:
- "3000:3000"
volumes:
- grafana_var_lib:/var/lib/grafana
@cy4n
cy4n / application.yml
Created August 24, 2018 07:12
this might break spring security depending on externalized configuration order
---
apiVersion: v1
kind: ConfigMap
metadata:
name: helloproperties
data:
application.yml: |
management:
endpoints:
web:
@cy4n
cy4n / pre-push
Last active August 14, 2018 14:51
pre-push hook to prevent from accidently pushing to master/develop/whateverbranch
#!/bin/bash
## add your branches here, like
## protected=('master' 'development' 'yourbranch')
protected=('master' 'develop')
current_branch=$(git rev-parse --abbrev-ref HEAD)
if (printf '%s\n' "${protected[@]}" | grep -xq $current_branch)
then
read -p "really push to $current_branch? [y|n] " -n 1 -r < /dev/tty
Retrying `git fetch --force --quiet --tags 'https://github.com/voxpupuli/voxpupuli-release-gem.git' "refs/heads/*:refs/heads/*"` due to error (4/4): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --tags 'https://github.com/voxpupuli/voxpupuli-release-gem.git' "refs/heads/*:refs/heads/*"` in directory /usr/local/lib/ruby/gems/2.4.0/cache/bundler/git/voxpupuli-release-gem-d62527b2b3def0d13f5b68d6e77153e9e292e483 has failed.
If this error persists you could try removing the cache directory '/usr/local/lib/ruby/gems/2.4.0/cache/bundler/git/voxpupuli-release-gem-d62527b2b3def0d13f5b68d6e77153e9e292e483'fatal: Not a git repository (or any of the parent directories): .git
Git error: command `git fetch --force --quiet --tags
'https://github.com/voxpupuli/voxpupuli-release-gem.git' "refs/heads/*:refs/heads/*"` in directory
/usr/local/lib/ruby/gems/2.4.0/cache/bundler/git/voxpupuli-release-gem-d62527b2b3def0d13f5b68d6e77153e9e292e483
has failed.
If this error persists you could try
@cy4n
cy4n / reclaimWindows10.ps1
Created July 12, 2016 12:38 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Forked from http://pastebin.com/gQxCUkLP
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Original Version: 1.4, 2016-01-16
# Tweaked based on personal preferences for @alirobe 2016-03-23 - v1.4.1
# NOTE: MAKE SURE YOU READ THIS SCRIPT CAREFULLY BEFORE RUNNING IT + ADJUST COMMENTING AS APPROPRIATE
# This script will reboot your machine when completed.
##########
# Ask for elevated permissions if required

Keybase proof

I hereby claim:

  • I am cy4n on github.
  • I am cyan (https://keybase.io/cyan) on keybase.
  • I have a public key whose fingerprint is B3AC 507B 4F42 FC4E 0DA1 59EB F8AC D006 F0D7 9081

To claim this, I am signing this object: