This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws iam update-login-profile --profile aws-builder-master --user-name JimBob --password "yourpasswordhere" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MyBuffer = $051800 | |
| * Just need to do this once after malloc | |
| InitDrawlines | |
| lda #<MyBuffer ; should be 1800 | |
| sta __p0 | |
| sta __p1 | |
| sta __p2 | |
| sta __p3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Self-signed certificate generator for AWS by Dagen Brock | |
| # The basic instructions come from Amazon: | |
| # https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl.html | |
| # | |
| # Specifically, you can generate a cert with these 3 commands: | |
| # openssl genrsa 2048 > privatekey.pem | |
| # openssl req -new -key privatekey.pem -out csr.pem | |
| # openssl x509 -req -days 365 -in csr.pem -signkey privatekey.pem -out server.crt | |
| # | |
| # This script walks you through generation and puts them in your specified output dir. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Invoke like: | |
| # $ python stripe.py example.c1 output_dir | |
| from sys import argv | |
| from array import array | |
| import os | |
| data = array('B') | |
| with open(argv[1], 'rb') as input_img: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### c1-to-png.py by Dagen Brock | |
| # | |
| # Example: python c1-to-png.py. mypicture.shr output.png | |
| # | |
| from PIL import Image, ImageDraw # `pip3 install pillow` if you don't have it | |
| from sys import argv | |
| def get_scanline_palette(scanline): | |
| scb = shr_buffer[0x7D00+scanline] # SCBs start at $E19D00 (SHR RAM starts offset +$2000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example: python c2-to-animgif.py anim.c2 outputname.gif | |
| from PIL import Image,ImageDraw # `pip3 install pillow==7.0.0` if you don't have it | |
| from sys import argv, stdout | |
| import glob, tempfile, struct, os | |
| def get_scanline_palette(scanline): | |
| scb = shr_buffer[0x7D00+scanline] # SCBs start at $E19D00 (SHR RAM starts offset +$2000) | |
| cur_pal_num = scb & 0x0F | |
| pal_offset = 0x7E00+(cur_pal_num*16*2) # each pal is 16 colors * 2 bytes per color | |
| # now make a dict of each index => (r,g,b) tuple |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REM "Trust the voice inside of you" - Digarok 2020-09-04 | |
| REM Reference: "Three Ways of Looking At A Function"" | |
| REM by James Fuller | |
| REM January 1983 (c) Creative Computing | |
| 100 DEF FN R(Q) = COS(9 * SIN(2*Q)) : HGR : POKE -16302,0: SZ=5: | |
| 700 FOR BB=SZ TO 0 STEP -1: SX=2*BB/SZ:SY=SX:HCOLOR=RND(1)*7+1 | |
| 800 FOR G = 0 TO 360 STEP 1 | |
| 810 T = G / 57.29576 | |
| 820 X = FN R(T) * COS(T) : Y = FN R(T) * SIN(T) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * Disassembly of @deater object tweet https://twitter.com/deater78/status/1368790980237791232 | |
| * by @65816guy / digarok/ Dagen Brock | |
| 00/00E7: 20 D8 F3 JSR F3D8 ; HGR2 -- set hi-res, page2, full graphics | |
| 00/00EA: 8A TXA | |
| 00/00EB: 20 11 F4 JSR F411 ; HPOS2 - positions hi-res cursor without plotting | |
| ; (A) = Y-coordinate, (Y,X) = X-coordinate | |
| 00/00EE: A2 01 LDX #01 | |
| 00/00F0: A0 F0 LDY #F0 | |
| 00/00F2: 20 5D F6 JSR F65D ; XDRAW - Draws a shape inverting dots (eor/xor) on screen. | |
| ; (A) = rotation, (Y,X) = address of the shape table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fileinput,re,time | |
| # parameters | |
| pattern_DEFINE_BYTE='^.+DB\s+\$([a-fA-F0-9][a-fA-F0-9])' | |
| pause_seconds=0.5 | |
| grid_range = range(4,33) # range is not inclusive | |
| join_str = "" # change to comma if you want CSV | |
| def print_chunked(datalist, chunksize): | |
| for i in range(0, len(datalist), chunksize): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## gcleanup ##### | |
| # I used to have a one liner but it was janky so reverting to a full blown function by golly gosh gee. | |
| # I like to show the branches if they don't specify one, but in oh_my_zsh they have some interactive thing | |
| # you need to turn off like: | |
| # $ git config --global pager.branch false | |
| # | |
| gcleanup_function() { | |
| if [ -z $1 ] ; then echo "You must specify a branch to cleanup." ; git branch ; return -1; fi | |
| git checkout master |