Skip to content

Instantly share code, notes, and snippets.

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

Daniel Bonates dbonates

🏠
Working from home
View GitHub Profile
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
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
@cheeaun
cheeaun / image-processing-services.md
Last active April 20, 2024 22:17
3rd-party image processing/manipulation/upscaling/enlarging services
@kristopherjohnson
kristopherjohnson / cachedThreadLocalObjectWithKey.swift
Last active March 17, 2023 19:29
Swift utility function to create and reuse a thread-local object
import Foundation
/// Return a thread-local object, creating it if it has not already been created
///
/// :param: create closure that will be invoked to create the object
/// :returns: object of type T
public func cachedThreadLocalObjectWithKey<T: AnyObject>(key: String, create: () -> T) -> T {
if let threadDictionary = NSThread.currentThread().threadDictionary {
if let cachedObject = threadDictionary[key] as T? {
return cachedObject
@EkkoG
EkkoG / hd.txt
Last active March 9, 2022 04:44
All WWDC 2015 sessions download URL (video subtitle: https://github.com/qiaoxueshi/WWDC_2015_Video_Subtitle)
http://devstreaming.apple.com/videos/wwdc/2015/217wu453thu1r1/217/217_hd_adopting_new_trackpad_features.mp4?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/2267p2ni281ba/226/226_hd_advanced_nsoperations.mp4?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/233l9q8hj9mw/233/233_hd_advanced_touch_input_on_ios.mp4?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/224o6pqmtb4ik/224/224_hd_app_extension_best_practices.mp4?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/2048w4vdjhe1i1m/204/204_hd_apple_watch_accessibility.mp4?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/232f1zopzycv/232/232_hd_best_practices_for_progress_reporting.mp4?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/213w6grumlfm0q/213/213_hd_building_apps_with_researchkit.mp4?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/234reaz1byqc/234/234_hd_building_document_based_apps.mp4?dl=1
http://devstreaming.apple.com/videos/wwdc/2015/2313dt427pmq/231/231_hd_cocoa_touch_best_practices.mp4?dl=1
http://devstreaming.apple.com/vide

Retropie + iPEGA 9025 Bluetooth Controller

/etc/udev/rules.d/99-bluetooth.rules

SUBSYSTEM=="input", ATTRS{name}=="ipega media gamepad controller", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"

/opt/retropie/configs/all/retroarch-joypads/ipega\ media\ gamepad\ controller.cfg

@dbonates
dbonates / users_test.json
Last active December 18, 2016 02:48
a users json for testing
[
{
"id": 186,
"picture": "https://placehold.it/32x32",
"name": {
"first": "Maynard",
"last": "Ward"
},
"email": "maynard.ward@undefined.us"
},
@dbonates
dbonates / ImageCache-iOS.swift
Last active December 14, 2021 01:00
A tiny and still kinda work in progress Image Cache along with convenient loader class DataService
//
// ImageCache.swift
// HMTestApp
//
// Created by Daniel Bonates on 05/12/21.
// Modified by Daniel Bonates on 05/12/21.
import UIKit
final class ImageCache {
@MaciejGad
MaciejGad / NSImageExtensions.swift
Created March 24, 2017 11:49
NSImage extensions for easy resizing, cropping and saving png images. Version updated for Swift 3. Originally by Raphael Hanneken https://gist.github.com/raphaelhanneken/cb924aa280f4b9dbb480
extension NSImage {
/// Returns the height of the current image.
var height: CGFloat {
return self.size.height
}
/// Returns the width of the current image.
var width: CGFloat {
return self.size.width
@BretFisher
BretFisher / pcat-install.sh
Last active February 6, 2024 14:41
On macOS: Install pygmentize and alias pcat for shell code syntax highlighting
# first install pygmentize to the mac OS X or macOS system with the built-in python
sudo easy_install Pygments
# then add alias to your ~/.bash_profile or ~/.bashrc or ~/.zshrc etc.
alias pcat='pygmentize -f terminal256 -O style=native -g'
@unnamedd
unnamedd / vim_cheatsheet.md
Created April 21, 2019 22:26 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close