This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Fix virtualenv symlinks after upgrading python with Homebrew and then running | |
# `cleanup`. | |
# | |
# After upgrading Python using Homebrew and then running `brew cleanup` one can | |
# get this message while trying to run python: | |
# dyld: Library not loaded: @executable_path/../.Python | |
# Referenced from: /Users/pablo/.venv/my-app/bin/python | |
# Reason: image not found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
// Enable all the features, including `::`-binding (ex, `setTimeout(::this.foo, 1000)`) | |
"stage": 0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.Views.Base = Backbone.View.extend({ | |
templateName: null, | |
render: function(){ | |
var data; | |
if(this.templateName !== null){ | |
if(this.model !== null){ | |
data = this.model.toJSON() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Usage | |
* $inconsistent_view_thingy = views_get_view("some_view_name"); | |
* $more_inconsistent_view_thingy = rand_obj_or_array($inconsistent_view_thingy); | |
*/ | |
function rand_obj_or_array($thing) { | |
$det = rand(0,2); |