Skip to content

Instantly share code, notes, and snippets.

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

cbmeeks cbmeeks

🏠
Working from home
View GitHub Profile
@cbmeeks
cbmeeks / bb.md
Created March 14, 2025 20:23
Connect to Bitbucket with SSH

Step 1: Check if SSH is Installed

  1. Open a terminal.

  2. Run: ssh -v

    • If it shows a version (e.g., OpenSSH), SSH is installed. If not, install it with:
      sudo apt update
      sudo apt install openssh-client
@cbmeeks
cbmeeks / svn2git.md
Last active March 5, 2025 19:00
Instructions on how to convert SVN repos into git (Bitbucket)

How to Import SVN Repos into BitBucket

Create New Repopository in Bitbucket

NOTE, if you create an empty repo in Bitbucket, it will default to the "main" branch and create a .gitignore file. Normally, this would be OK. However, the .gitignore file will cause a conflict because the newly created repo will not be empty. You will need to pull then push.

It is recommended to NOT create a .gitignore file by default and make sure the new repo is completely empty.

@cbmeeks
cbmeeks / users.py
Created February 17, 2025 16:11
Add Cognito Users to a Group
# Before running, make sure you set your ~/.aws/credentials and ~/.aws/config properly.
# Just run: aws configure
# Then enter your access key, secret key and region.
import boto3
client = boto3.client('cognito-idp')
user_pool_id = '<<USER POOL ID>>' # Change to your user pool ID
group_name = 'MY_GROUP' # Change to whatever group you want. Make sure it exists first.
@cbmeeks
cbmeeks / odd.java
Created February 21, 2024 20:45
Convert Odd DateTime String
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
public class Main {
public static void main(String[] args) throws ParseException {
final String dateTime = "20240310 120600.000";
@cbmeeks
cbmeeks / custom.js
Created November 30, 2023 01:35
Simple Combo / Select Box
const autocomplete = (inputId, listId, dimensionCode) => {
const input = document.getElementById(inputId)
const list = document.getElementById(listId)
if (!input || !list) return false
list.innerHTML = ''
let items = []
let current = -1
const bg_default = 'bg-white'
const bg_select = 'bg-blue-500'
@cbmeeks
cbmeeks / debug.asm
Last active January 8, 2023 05:47
Simple integer to hex print in 6502 assembly language
// This is for the Commodore 64 and requires KickAssembler
// Written by Cecil Meeks (cbmeeks) in 2023
// NOTE, this prints whatever is in A to the screen. So load A first.
// First, create a simple macro:
.macro DebugText_A_Hex(X, Y) {
sta ModA + 1 // save A below
stx ModX + 1 // save X below
sty ModY + 1 // save Y below
@cbmeeks
cbmeeks / usb_hid_keys.h
Created January 6, 2023 02:19 — forked from ekaitz-zarraga/usb_hid_keys.h
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@cbmeeks
cbmeeks / main.java
Created March 2, 2022 16:32
Pilot Example
package com.company;
public class Main {
public static void main(String[] args) {
// write your code here
String badNumber = "ABC123";
String goodNumber = "423-867-5309";
@cbmeeks
cbmeeks / main.java
Created March 2, 2022 16:19
Valid Phone Number
package com.company;
public class Main {
public static void main(String[] args) {
String badNumber = "ABC123";
String goodNumber = "423-867-5309";
System.out.println("Testing Number " + badNumber);
System.out.println("\t" + isValidNumber(badNumber));
@cbmeeks
cbmeeks / stable_raster.asm
Last active August 18, 2020 17:24
Stable Raster
/*
This is working for NTSC. However, by my calculations, we're at 68 cycles instead of the required 65.
That can't be right. Yet, it works. I assume I am making a false assumption on some of the timings.
*/
BasicUpstart2(Entry)
Entry: