Skip to content

Instantly share code, notes, and snippets.

@thomasdarimont
thomasdarimont / keycloak-16.1.0-database-schema.svg
Last active March 14, 2024 10:30
Keycloak 16.1.0 Database Schema as SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active January 28, 2024 08:19
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
@pratikone
pratikone / tweetthreader.py
Created March 17, 2020 02:30
This script fetches and creates threads from twitter statuses of a twitter profile. A thread is a series of tweets created by replying to your own tweet.
import os
import re
import time
from collections import namedtuple
import codecs
import tweepy
import json
from datetime import datetime
from requests.exceptions import Timeout, ConnectionError
from requests.packages.urllib3.exceptions import ReadTimeoutError, ProtocolError
@madan712
madan712 / read_write_file.py
Last active June 17, 2022 10:42
Python - Read and write a text file
def write_file():
print("Writing a file..")
try:
f = open("my_file.txt", "a")
for num in range(100):
f.write("Line " + str(num) + "\n")
f.close()
except Exception:
print("Could not write to file")
@xirixiz
xirixiz / Set up GitHub push with SSH keys.md
Last active May 13, 2024 19:40 — forked from developius/README.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"
@aunyks
aunyks / snakecoin-server-full-code.py
Last active March 8, 2024 19:22
The code in this gist isn't as succinct as I'd like it to be. Please bare with me and ask plenty of questions that you may have about it.
from flask import Flask
from flask import request
import json
import requests
import hashlib as hasher
import datetime as date
node = Flask(__name__)
# Define what a Snakecoin block is
class Block:
import hashlib as hasher
import datetime as date
# Define what a Snakecoin block is
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
@gititGoro
gititGoro / Recipe.md
Last active September 15, 2023 07:32
Environmental setup for Ethereum Dev as of 14 June 2017

Setting up a private ethereum blockchain for development and pointing your wallet at it

Ethereum tutorials all advise downloading the Mist wallet and beginning dev. The only problem is that the testnet and real blockchain are huge and take hours to download. What follows is a recipe for quickly setting up a small blockchain and pre-mining it with some test ethereum

The following is done in Linux but will work in MacOS and should have equivalent command line options in Windows. Where I don't give detailed instructions, it's because a quick google search will fill in the blanks.

Install geth https://github.com/ethereum/go-ethereum/wiki/geth

install Mist https://github.com/ethereum/mist/releases

@voghDev
voghDev / PreferenceHelper.java
Last active June 29, 2020 20:16
Generic Preference Helper to save some lines of code managing shared preferences
/*
* Copyright (C) 2016 Olmo Gallegos Hernández.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@robotdad
robotdad / launch.json
Created July 20, 2016 00:00
vscode-arduino-jsons
{
"version": "0.2.0",
"configurations": [
{
"name": "Arduino attach (Windows)",
"type": "cppdbg",
"request": "launch",
"launchOptionType": "Local",
"miDebuggerPath": "C:/Users/mgoodner/AppData/Local/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gdb.exe",
"targetArchitecture": "ARM",