Skip to content

Instantly share code, notes, and snippets.

View andrzejsliwa's full-sized avatar

Andrzej Śliwa andrzejsliwa

View GitHub Profile
@andrzejsliwa
andrzejsliwa / SMBDIS.ASM
Created May 5, 2018 15:01 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
; ___ _ __ ___ __ ___
; / __|_ _ __ _| |_____ / /| __|/ \_ )
; \__ \ ' \/ _` | / / -_) _ \__ \ () / /
; |___/_||_\__,_|_\_\___\___/___/\__/___|
; An annotated version of the snake example from Nick Morgan's 6502 assembly tutorial
; on http://skilldrick.github.io/easy6502/ that I created as an exercise for myself
; to learn a little bit about assembly. I **think** I understood everything, but I may
; also be completely wrong :-)
https://stackoverflow.com/questions/49001329/gdb-doesnt-work-on-macos-high-sierra-10-13-3
How to degrade to gdb 8.0.1:
- Unlink current gdb: brew unlink gdb
- Install gdb 8.0.1: brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/9ec9fb27a33698fc7636afce5c1c16787e9ce3f3/Formula/gdb.rb
- Optional: avoid upgrade gdb with brew pin gdb
@andrzejsliwa
andrzejsliwa / codesign_gdb.md
Created April 3, 2018 12:36 — forked from gravitylow/codesign_gdb.md
Codesign gdb on macOS

If you are getting this in gdb on macOS while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
  1. Open Keychain Access
  2. In menu, open Keychain Access > Certificate Assistant > Create a certificate
  3. Give it a name (e.g. gdbc)
@andrzejsliwa
andrzejsliwa / .mutant_ignored_subjects
Last active March 7, 2018 09:13
ugly proof of concept for Mutant rake task for Rails application with configuration files
Some#method
@andrzejsliwa
andrzejsliwa / README.md
Created March 5, 2018 12:19 — forked from sevos/README.md
Rails 5.2 + Komponent + Turbolinks + Stimulus

Usage

rails new my_app --rc=template.rc -m template.rb
@andrzejsliwa
andrzejsliwa / 00_destructuring.md
Created February 13, 2018 14:23 — forked from john2x/00_destructuring.md
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors

@andrzejsliwa
andrzejsliwa / boot.zsh
Last active February 7, 2018 13:35
configuration for Clojure 1.9 on Java 9 to avoid errors related to java.xml.bind, (boot.zsh for boot, profiles.clj for leiningen)
# for boot in your .bashrc or .zshrc
export BOOT_JVM_OPTIONS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.xml.bind'
namespace :erb do
desc 'Convert erb tempaltes to slim'
task :to_slim do
require 'html2slim'
FileList["#{Rails.root}/app/views/**/*.html.erb",
"#{Rails.root}/frontend/**/*.html.erb"].each do |erb|
slim_output = erb.sub(/\.erb$/, '.slim')
@andrzejsliwa
andrzejsliwa / cognito.yaml
Created December 8, 2017 12:40 — forked from singledigit/cognito.yaml
Create a Cognito Authentication Backend via CloudFormation
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Parameters:
AuthName:
Type: String
Description: Unique Auth Name for Cognito Resources
Resources:
# Creates a role that allows Cognito to send SNS messages