Skip to content

Instantly share code, notes, and snippets.

View DerekChia's full-sized avatar
🎯
Focusing

Derek Chia DerekChia

🎯
Focusing
View GitHub Profile
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active April 26, 2024 07:30
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@chabala
chabala / using-google-takeout.md
Last active April 25, 2024 20:26
Merge and extract tgz files from Google Takeout

Recently found some clowny gist was the top result for 'google takeout multiple tgz', where it was using two bash scripts to extract all the tgz files and then merge them together. Don't do that. Use brace expansion, cat the TGZs, and extract:

$ cat takeout-20201023T123551Z-{001..011}.tgz | tar xzivf -

You don't even need to use brace expansion. Globbing will order the files numerically:

$ cat takeout-20201023T123551Z-*.tgz | tar xzivf -
@beckernick
beckernick / 10min_cudf_cupy.ipynb
Last active March 19, 2021 17:01
10 Minutes to cuDF and CuPy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@veggiemonk
veggiemonk / CKAD.md
Last active March 8, 2024 10:22
CKAD exam preparation
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active April 25, 2024 01:09
crack activate Office on mac with license file
@jeremyjordan
jeremyjordan / sgdr.py
Last active December 4, 2023 13:41
Keras Callback for implementing Stochastic Gradient Descent with Restarts
from keras.callbacks import Callback
import keras.backend as K
import numpy as np
class SGDRScheduler(Callback):
'''Cosine annealing learning rate scheduler with periodic restarts.
# Usage
```python
schedule = SGDRScheduler(min_lr=1e-5,
@GreenRiverRUS
GreenRiverRUS / convert.py
Created November 25, 2017 20:41
Simple converter to ConLL-2003 NER format for spaCy model training
DATA = [
[
[['Who', 'is', 'Shaka', 'Khan', '?'], ['O', 'O', 'I-PER', 'I-PER', 'O']]
],
[
[['I', 'like', 'London', 'and', 'Berlin', '.'], ['O', 'O', 'I-LOC', 'O', 'I-LOC', 'O']]
]
]
with open('output.conll', 'w') as f:
@ba11b0y
ba11b0y / installing-postman.md
Last active August 31, 2023 19:21
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz
@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active April 19, 2024 18:12
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@korakot
korakot / colab_download.py
Created November 15, 2017 08:40
Google colab file upload/download
files.download('example.txt') # from colab to browser download