Skip to content

Instantly share code, notes, and snippets.

View JamesMcMahon's full-sized avatar

James F McMahon JamesMcMahon

  • VMWare
  • Chicago, IL
View GitHub Profile
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 6, 2024 10:42
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@josefnpat
josefnpat / readme.md
Last active April 7, 2024 11:39
Going from Lua 5.2 to PICO-8's Lua

This information applies to the PICO-8 0.1.6 release.

This document is here to help folks with a proficiency in Lua understand the limitations and discrepencies between Lua and PICO-8's Lua.

You can always view the manual or yellowafterlife's extended 0.1.1 manual.

General

  • anything written in uppercase the PICO-8 editor or .p8 is made lowercase by the editor. → editing the .p8 file directly can work
  • print(function() end) outputs the string function instead of the string function: 0x0000000.
@jasongilman
jasongilman / atom_clojure_setup.md
Last active January 11, 2024 09:13
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@Jellybit
Jellybit / CameraControl.cs
Last active September 4, 2023 04:23
Super Metroid style camera for Unity3D.
using UnityEngine;
using System.Collections;
// This is basically how the Super Metroid camera worked. Whichever direction you moved, the camera would
// move in the same direction a multiple of the player's speed. Once the center of the camera moved a
// certain distance from the player, the camera would lock on the player and move the same speed. Change
// movement direction, and the camera would once again move more quickly to catch up and place itself
// ahead of the player's movement.
// Super Metroid also had area limits and locked certain axes based on where you were. For instance, if
@daemon3000
daemon3000 / TagsAndLayersTool.cs
Last active August 2, 2023 03:59
A tool for Unity that generates type safe tags and layers
#region [Copyright (c) 2014-2017 Cristian Alexandru Geambasu]
// Distributed under the terms of an MIT-style license:
//
// The MIT License
//
// Copyright (c) 2014-2017 Cristian Alexandru Geambasu(daemon3000@hotmail.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,

Where you able to produce a binary directly from the Rust build tools that you could submit to the app/play store?


Not quite, but I tried to get as close to that as was reasonably possible. Alas, things ended up a little convoluted.

For iOS, I have a nearly empty Xcode project with a build script that copies my cargo produced executable into the .app that Xcode generates (before Xcode signs it). The build script also uses lipo to merge the executables for each architecture I’m targeting (e.g. armv7 and aarch64 for non-simulator devices) into a single, universal binary.

On top of that, there are various iOS-y things that need to happen before my application’s main method is called. SDL2 provides the Objective-C code that does all of that. In a C or C++ game, SDL2 renames main to SDL_main, and then [inserts its own mai

@michaelbartnett
michaelbartnett / LICENSE.txt
Last active October 17, 2022 10:29
Tuple implementation for use with Unity3d
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@kimsama
kimsama / Debug.cs
Created November 21, 2012 04:38
It overrides UnityEngine.Debug to mute debug messages completely on a platform-specific basis. [Edit] Added isDebugBuild property.
//#if UNITY_EDITOR
//#define DEBUG
//#endif
using UnityEngine;
using System.Collections;
using System;
using System.IO;
using System.Text.RegularExpressions;
using UnityEngineInternal;
#! /usr/local/bin/fish
if test -n "$HOME" ;
set -xg NIX_LINK "$HOME/.nix-profile"
# Set the default profile.
if not test -L "$NIX_LINK" ;
echo "creating $NIX_LINK" >&2
set -l _NIX_DEF_LINK /nix/var/nix/profiles/default
/nix/store/cdybb3hbbxf6k84c165075y7vkv24vm2-coreutils-8.23/bin/ln -s "$_NIX_DEF_LINK" "$NIX_LINK"
end