Skip to content

Instantly share code, notes, and snippets.

View oceansize's full-sized avatar

Roi oceansize

View GitHub Profile
@prestia
prestia / installing_MTGA_on_macOS_with_Retina_support.md
Last active October 13, 2023 23:22
Instructions on how to install Magic the Gathering Arena on macOS with Retina support.

Installing MTGA on macOS using Wine, and making it look pretty!

The following instructions are heavily inspired by /u/uhohohdear. I modified uhohohdear's instructions and then added support for Retina/HiDPI displays and instructions about how to update MTGA.

IMPORTANT UPDATE: This will no longer work if you upgrade to macOS Catalina, as Wine and Wineskin are 32-bit. I'll update this Gist with 64-bit versions when they become available.

We're back in business!

It appears that the workarounds no longer work. A few people with Macs using Nvidia graphics cards are having success, but Macs with Intel and AMD GPUs crash regularly. At this time, the best way to play Arena on Mac is via Boot Camp or GeForce Now.

@zcaceres
zcaceres / Eyeballing-This.md
Last active August 17, 2023 23:38
Understanding Binding and 'this' in Javascript by zach.dev

How to Eyeball Your ‘This’ Context in Javascript

The early programmer struggles with the Javascript keyword this. But understanding your this context is easier than it seems.

This is all about where a function is invoked. Often, early programmers worry about where the function was declared. Perhaps the function was declared in a specific file or a particular object. Surely this changes it's this!

Nope.

@ArturT
ArturT / init.coffee
Created November 10, 2016 17:12
Toggle vim mode plus in Atom editor. Based on http://chibicode.com/useful-atom-vim-mode-snippets/
atom.commands.add 'atom-text-editor',
'user:toggle-vim-mode-plus': (event) ->
if atom.packages.isPackageDisabled("vim-mode-plus")
atom.packages.enablePackage("vim-mode-plus")
else
atom.packages.disablePackage("vim-mode-plus")
@yogsototh
yogsototh / Tuto.md
Last active May 30, 2023 12:07
Starting Emacs in GUI with shell environment variables correctly set

Problem

When starting Emacs.app on Mac, the Emacs doesn't have some environment variable set correctly. Typically it is terrible when you use GPG, pinentry-mac, gpg-agent But also a lot of different variables used to make git works correctly, etc...

Solution

  1. Create the file ~/bin/init-app-env.sh:
@medmunds
medmunds / README.md
Created March 29, 2016 02:32
Taking back your Mandrill click-tracking links

Taking back your Mandrill click-tracking links

My company, like many, has recently switched away from using Mandrill for our transactional email.

We'd been using Mandrill's [click-tracking][mandrill-click-tracking] feature, and became worried about what would happen to all those old emailed links after we cancel our Mandrill account.

Why should we care about links in emails sent a month or more ago?

@r00k
r00k / q1.md
Last active January 29, 2017 03:00
Quizzy Question 1

Question 1

What object-oriented programming advice is this code violating?

def check_for_overheating(system_monitor)
  if system_monitor.temperature > 100
    system_monitor.sound_alarms
  end
end
@r00k
r00k / a4.md
Last active April 3, 2016 10:53
Quizzy Question 5

Answer to Question 4

detect makes things a little shorter:

widgets.detect { |widget| widget.size > 3 }
@zoeabryant
zoeabryant / sublime-talk.md
Last active August 29, 2015 14:04
Sublime Text Shortcuts - Talk prep

Sublime Text talk cheatsheet

For Makers Academy Talk

Update 6/10/14 So I'm back at makers one day and I find out this list is still in use, and has been passed onto the new cohort as well! I'm so glad it is useful. With this in mind, I have updated it a little bit. There are now sections: Moving around open files and Split working areas. I hope these will be of use to you. Also a shout out to the awesome Tatiana Soukiassian who has carried on the shortcut love and created another fantastic list of keyboard shortcuts for sublime and beyond, listed by how essential they are. Much love Tatiana!!

Keys

⌘ Command key

⌃ Control key (ctrl)

@basham
basham / css-units-best-practices.md
Last active June 1, 2024 09:05
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units