Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <?php | |
| /** | |
| * @constructor overloading using the __call() function | |
| * | |
| */ | |
| class Player { | |
| private $name; | |
| private $surname; | |
| private $country; |
| function Thing(context, name) { | |
| this.context = context; | |
| this.name = name; | |
| this.init(); | |
| this.startTheWorstGarbageCollectorEver(); | |
| } | |
| Thing.prototype.startTheWorstGarbageCollectorEver = function() { | |
| var id = setInterval(function() { | |
| if (!this.context[this.name]) { |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| [merge] | |
| keepBackup = false | |
| tool = p4merge | |
| [mergetool "p4merge"] | |
| cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\"" | |
| keepTemporaries = false | |
| trustExitCode = false | |
| keepBackup = false | |
| [diff] | |
| tool = p4merge |
| # opening and closing windows and popovers | |
| defaults write -g NSAutomaticWindowAnimationsEnabled -bool false | |
| # smooth scrolling | |
| defaults write -g NSScrollAnimationEnabled -bool false | |
| # showing and hiding sheets, resizing preference windows, zooming windows | |
| # float 0 doesn't work | |
| defaults write -g NSWindowResizeTime -float 0.001 |
| #!/bin/bash | |
| # Copyright (c) 2012 Yu-Jie Lin | |
| # | |
| # 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, and/or sell copies | |
| # of the Software, and to permit persons to whom the Software is furnished to do | |
| # so, subject to the following conditions: | |
| # |
| package db | |
| // stdlib | |
| import ( | |
| "fmt" | |
| "os" | |
| ) | |
| // external | |
| import ( |
| #!/usr/bin/env bash | |
| if ! aws_bin="$(which aws)" 2>/dev/null; then | |
| echo "aws cli is missing; you can get it from https://aws.amazon.com/cli/" | |
| exit 1 | |
| fi | |
| if ! jq_bin="$(which jq)" 2>/dev/null; then | |
| echo "jq is missing; you can get it from https://stedolan.github.io/jq/" | |
| exit 1 |