Skip to content

Instantly share code, notes, and snippets.

View littlebeeper's full-sized avatar

Cuneyt Ozen littlebeeper

View GitHub Profile
@littlebeeper
littlebeeper / CreditcardMasker.java
Created November 5, 2018 09:09 — forked from ariesmcrae/CreditcardMasker.java
This will mask the following credit cards: Visa, Mastercard, Amex, Diners, Discovery, JCB
/**
* This will mask a portion of a credit card with 'x' if it finds it in a sentence.
\b(?:
# Visa card number 4[\ -]*(?:\d[\ -]*){11}(?:(?:\d[\ -]*){3})?\d|
# MasterCard card number (?:5[\ -]*[1-5](?:[\ -]*\d){2}|(?:2[\
-]*){3}[1-9]|(?:2[\ -]*){2}[3-9][\ -]*\d|2[\ -]* [3-6](?:[\ -]*\d){2}|2[\
-]*7[\ -]*[01][\ -]*\d|2[\ -]*7[\ -]*2[\ -]*0)(?:[\ -]*\d){12}|
@littlebeeper
littlebeeper / cqlsh_intro.cql
Created April 27, 2020 16:44 — forked from jeffreyscarpenter/cqlsh_intro.cql
Introduction to CQL / cqlsh
#
# cqlsh_intro.cql
#
# Copyright (C) 2017 Jeff Carpenter
# Execute the commands in this file for a short guided tour of the CQL Shell (cqlsh)
#
# For more description, see Cassandra, The Definitive Guide 2nd Ed., Chapter 3: Installing
# http://shop.oreilly.com/product/0636920043041.do
#
@littlebeeper
littlebeeper / backup-github.sh
Created February 28, 2023 14:49 — forked from rodw/backup-github.sh
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
#-------------------------------------------------------------------------------
# NOTES:
#-------------------------------------------------------------------------------
# * Under the heading "CONFIG" below you'll find a number of configuration
# parameters that must be personalized for your GitHub account and org.
# Replace the `<CHANGE-ME>` strings with the value described in the comments
# (or overwrite those values at run-time by providing environment variables).
@littlebeeper
littlebeeper / docker-debug.md
Created November 4, 2023 18:28 — forked from rordi/docker-debug.md
Docker debugging an existing image

Debugging a Docker image

Start up the Docker container from image:

docker run --entrypoint "/bin/bash" --rm imagename:latest -c "sleep 24h"

Obtain the container hash id:

docker ps