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
| ; Signature and command IDs. | |
| ; Signature selects the resident parser shape. | |
| ; Command ID is the registry command identity. | |
| SIG_ZADD16 = 2 | |
| CMD_ZADD16 = 2 | |
| ; 32-byte descriptor macro for a command whose worker lives in LOWPACK. | |
| ; LOWPACK code is copied from REU bank $45 into the low overlay area. | |
| .macro CMD_LOW id, sig, label, endlabel, name | |
| .byte id, RB_CMD_F_LOW ; descriptor[0]=id, [1]=low-overlay flag |
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
| const c64 = @import("c64"); | |
| const Cell = enum(u8) { empty = 0, x = 1, o = 2 }; | |
| const Mode = enum(u8) { two_player = 0, ai = 1 }; | |
| const Outcome = enum(u8) { playing = 0, x_win = 1, o_win = 2, draw = 3, dead_draw = 4 }; | |
| const Board = struct { cells: [9]Cell }; | |
| const Game = struct { | |
| board: Board, | |
| moves: [9]u8, |
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
| 10 rem c64u uci http query tester v1.6 | |
| 20 print chr$(147):poke646,1:print "c64u uci http qry v1.6" | |
| 30 rem c() is command bytes, d() is uci reply bytes | |
| 40 dim c(260),d(260):dc=260 | |
| 50 rem endpoint pieces: httpbin echoes query in json args | |
| 60 hn$="httpbin.org":qp$="codex=basic&uci=1" | |
| 70 pa$="/get?"+qp$:ag$="c64u-basic/1.0" | |
| 80 rem find uci, identify network target, open tcp | |
| 90 gosub 1000:if er then end | |
| 100 co=3:m$="uci base "+str$(ba):gosub 900 |
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
| Enum GainTerm { | |
| Short | |
| Long | |
| } | |
| Enum GainLoss { | |
| Gain | |
| Loss | |
| } |
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
| function Out-Numbers { | |
| <# | |
| .SYNOPSIS | |
| Converts PowerShell Objects in CSV and opens in Numbers on macOS | |
| .DESCRIPTION | |
| Converts PowerShell Objects in CSV and opens in Numbers on macOS | |
| TODO, maybe allow passing through a filename, an only using temp if not. | |
| then allow certian parameters for export-csv like type, or no clobber or append.. | |
| .PARAMETER InputObject | |
| Object to output |
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
| module ActiveMerchant #:nodoc: | |
| module Billing #:nodoc: | |
| class FirstdataE4Gateway < Gateway | |
| # TransArmor support requires v11 or lower | |
| self.test_url = 'https://api.demo.globalgatewaye4.firstdata.com/transaction/v11' | |
| self.live_url = 'https://api.globalgatewaye4.firstdata.com/transaction/v11' | |
| TRANSACTIONS = { | |
| sale: '00', | |
| authorization: '01', |
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
| module ActiveMerchant #:nodoc: | |
| module Billing #:nodoc: | |
| class FirstdataE4V27Gateway < Gateway | |
| self.test_url = 'https://api.demo.globalgatewaye4.firstdata.com/transaction/v27' | |
| self.live_url = 'https://api.globalgatewaye4.firstdata.com/transaction/v27' | |
| TRANSACTIONS = { | |
| sale: '00', | |
| authorization: '01', | |
| verify: '05', |
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
| $rabbitserver = 'localhost:15672' | |
| $cred = Get-Credential | |
| iwr -ContentType 'application/json' -Method Get -Credential $cred "http://${rabbitserver}/api/queues" | % { | |
| ConvertFrom-Json $_.Content } | % { $_ } | ? { $_.messages -gt 0} | % { | |
| iwr -method DELETE -Credential $cred -uri $("http://${rabbitserver}/api/queues/{0}/{1}" -f [System.Web.HttpUtility]::UrlEncode($_.vhost), $_.name) | |
| } | |
| iwr -Cr $cred "http://${rabbitserver}/api/queues" | % { ConvertFrom-Json $_.Content } | % { $_ } | % {iwr -me DELETE -Cr $cred $("http://${rabbitserver}/api/queues/{0}/{1}" -f [System.Web.HttpUtility]::UrlEncode($_.vhost), $_.name)} | |
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
| public static class Using | |
| { | |
| public static T Expression<T, T1>(Func<T1> createResourceLamda, Func<T1,T> work) | |
| { | |
| //what using statement generates in IL is equiv to this pattern | |
| //http://msdn.microsoft.com/en-us/library/yh598w02.aspx | |
| T1 usingResource = createResourceLamda(); | |
| try | |
| { | |
| return work(usingResource); |
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
| ${variable:troll .....'',;;::cccllllllllllllcccc:::;;,,,''...'',,'.. | |
| ..';cldkO00KXNNNNXXXKK000OOkkkkkxxxxxddoooddddddxxxxkkkkOO0XXKx:. | |
| .':ok0KXXXNXK0kxolc:;;,,,,,,,,,,,;;,,,''''''',,''.. .'lOXKd' | |
| .,lx00Oxl:,'............''''''................... ...,;;'. .oKXd. | |
| .ckKKkc'...'',:::;,'.........'',;;::::;,'..........'',;;;,'.. .';;'. 'kNKc. | |
| .:kXXk:. .. .................. .............,:c:'...;:'. .dNNx. | |
| :0NKd, .....''',,,,''.. ',...........',,,'',,::,...,,. .dNNx. | |
| .xXd. .:;'.. ..,' .;,. ...,,'';;'. ... .oNNo | |
| .0K. .;. ;' '; .'...'. .oXX: |
NewerOlder