Skip to content

Instantly share code, notes, and snippets.

View jseverson's full-sized avatar

Jay Severson jseverson

View GitHub Profile
@jseverson
jseverson / gist:869922
Created March 14, 2011 21:27
Longest query on chess.com
# Time: 110314 14:18:15
# User@Host: chessguest[chessguest] @ [10.0.0.28]
# Thread_id: 524224906 Schema: chess
# Query_time: 0.637396 Lock_time: 0.007573 Rows_sent: 1 Rows_examined: 1822 Rows_affected: 0 Rows_read: 1822
# Bytes_sent: 64 Tmp_tables: 1 Tmp_disk_tables: 0 Tmp_table_sizes: 0
SET timestamp=1300137495;
select
count(distinct(um.to_user_id)) as row_count
from
user_message um
public function buildForm(FormBuilder $builder, array $options)
{
parent::buildForm($builder, $options);
//now add custom fields to this one
$builder
->add('isEnabled')
public function catchallAction($slug)
{
//lets see if its a program slug
if ($program = $this->get('exercise.program.repository.program')->findOneBySlug($slug)) {
//we want to enforce this request to be secure but only on production
if (!$this->get('request')->isSecure()) {
//redirect to same url but on secure port
}
return $this->forward('ProgramBundle:ProgramSignup:sales', array('slug' => $slug));
$page = $this->get('request')->query->get('page');
if (!$page && $queryString = $this->get('request')->server->get('QUERY_STRING')) {
if (preg_match("/page=(\d+)/",$queryString,$matches)) {
$page = $matches[1];
}
}
Array ( [Request] => POST /backend/program/edit-branding/4e25d8620a44f3bb2b870000 [Response] => 500 [Exception] => parse error: failed at `@navBorderColor: + #6f6f6f;` /data/exercise-deploys/master/exercise/cache/prod/program_asset_dumper/branding.less on line 88 (code: 0) [Trace] => Array ( [0] => Array ( [namespace] => [short_class] => [class] => [type] => [function] => [file] => /data/exercise-deploys/master/vendor/lessphp/lessc.inc.php [line] => 1730 [args] => Array ( ) ) [1] => Array ( [namespace] => [short_class] => lessc [class] => lessc [type] => -> [function] => throwParseError [file] => /data/exercise-deploys/master/vendor/lessphp/lessc.inc.php [line] => 1683 [args] => Array ( ) ) [2] => Array ( [namespace] => [short_class] => lessc [class] => lessc [type] => -> [function] => parseTree [file] => /data/exercise-deploys/master/vendor/lessphp/lessc.inc.php [line] => 1010 [args] => Array ( ) ) [3] => Array ( [namespace] => [short_class] => lessc [class] => lessc [type] => -> [function] => compileProp [f
@jseverson
jseverson / bitnopoly-rules
Created September 16, 2013 16:27
Bitnopoly Rule Changes
Many people have asked about the rule changes in Bitnopoly.
Auctions:
In order to prevent collusion in 3+ player games, we have removed trading and replaced it with an open auction trading system.
1% Maintenance Fee:
Each time you roll the dice, you must pay a maintenance fee of 1% of your property value. The purpose of this is prevent property hoarding as well as promote auctions or trades. It also forces players to be more strategic about which properties they choose to buy. If the maint fees get too high, a player can alleviate these fees by mortgaging properties. Mortgaged properties are not considered as part of your property value 1% calculation.
@jseverson
jseverson / keybase.md
Created April 24, 2018 20:56
keybase.md

Keybase proof

I hereby claim:

  • I am jseverson on github.
  • I am cryptalktome (https://keybase.io/cryptalktome) on keybase.
  • I have a public key ASDo1P8Gdi4XqFAF0CW59VLf30SiEg0u3q0o3SuR63XPvQo

To claim this, I am signing this object: