Skip to content

Instantly share code, notes, and snippets.

View alxjrvs's full-sized avatar
🗯️
Testing My Luck

Alex Jarvis alxjrvs

🗯️
Testing My Luck
View GitHub Profile
@alxjrvs
alxjrvs / gist:8016472
Created December 18, 2013 02:39
Stutorial
Imagine breaking down the Rules text on “Lightning bolt”, written backwards with regards to structural rules.
So, we might start at the most universal aspect of a magic card - it is a “Card”, in a game that cares about cards.
How do we go deeper? we can divide at permanents and non permanents. One kind of spell creates a permanent, the other does not. So lets go on to “Non Permanents”, then.
From here, we break into more recognizable game attributes - Instants and Sorceries, each with their own rules.
What we have is a class hierarchy, each a level of rules that apply at that level and also every level moving forward. What matters to a “Card” matters to a “Sorcery”, because “Sorcery” is a kind of “NonPermanent”, which itself is a “Card”.
@alxjrvs
alxjrvs / gist:10590248
Created April 13, 2014 16:07
keybase.md
### Keybase proof
I hereby claim:
* I am alxjrvs on github.
* I am alxjrvs (https://keybase.io/alxjrvs) on keybase.
* I have a public key whose fingerprint is 08FE 4CF6 EFCD A617 D3A2 EFDA 1C79 77FE 199B 3958
To claim this, I am signing this object:
@alxjrvs
alxjrvs / .zshrc
Last active August 29, 2015 14:01
# for golang
# mkdir $HOME/go
# mkdir -p $GOPATH/src/github.com/user
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
considered :canonical if: :remote_uuid, present: true
considered :canonical if: do
:remote_uuid, present: true
:investors, { investors > 40}
:boolean_method
end
considered :canonical if: do |obj|
obj.remote_uuid, present: true
@alxjrvs
alxjrvs / gist:50204fbc00520a477a8c
Created June 9, 2014 05:07
Body_attributes method for Namespacing CSS
#Template in HAMl using Literal Syntax
body{ body_attributes}
#Method in ApplicationHelper
def body_attributes
{
class: [controller.controller_name, controller.action_name].join(' ')
}
#If you are setting a custom folder for Carrierwave uploads and that folder structure relies on related objects,
# be sure that those related objects are already created before initializing the carrierwave object!
##This is bad
User.create(
username: "cosby",
avatar: Avatar.create(file: <a file>)
@alxjrvs
alxjrvs / 0_reuse_code.js
Created August 18, 2014 20:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@alxjrvs
alxjrvs / gist:4b73771294ea25feb2f7
Last active August 29, 2015 14:06
Android-motion Gotchas!

#Two Gotcha's In the @RubyMotion getting started guide for Android

##The NDK Does not Support API level L I got this error when I tried to rake device for the first time.

ERROR! It looks like your version of the NDK does not support API level L. Switch to │  7       structure: Structure
a lower API level or install a more recent NDK.

I and my team are working off of master. We use a Pull Request flow: Feature branch, PR Review, Cleanup, Merge.

Feature Branch

I make branch 'feature' off of master.

---o---o---o---master
           |---feature
@alxjrvs
alxjrvs / SassMeister-input-HTML.html
Created October 3, 2014 20:40
Generated by SassMeister.com.
<div class='btn-primary-large'>
</div>