Skip to content

Instantly share code, notes, and snippets.

View gistya's full-sized avatar

Jon Gilbert gistya

  • Portland, OR
View GitHub Profile
CFLAGS+=" -arch x86_64 " ./configure --enable-maintainer-zts \
--with-openssl=/usr/local/opt/openssl \
--with-pcre-regex=/usr/local/opt/pcre \
--with-curl=/usr/bin/curl \
--enable-exif \
--with-apxs2=/usr/local/apache-2.4.17/bin/apxs \
--prefix=/usr/local/apache-2.4.17/php/ \
--enable-sockets \
--enable-zip \
--with-pear=/usr/local/apache-2.4.17/lib/php \
CFLAGS+="-arch x86_64 -DAPR_USE_FLOCK_SERIALIZE -DAPR_HAS_FLOCK_SERIALIZE" LDFLAGS+="-arch x86_64" ./configure --prefix=/usr/local/apache-2.4.17 \
--with-mpm=prefork \
--with-ssl=/usr/local/opt/openssl \
--enable-mods-shared=reallyall \
--enable-http \
--enable-layout=Darwin \
--with-suexec-bin=/usr/bin/suexec \
--with-included-apr \
--with-included-apr-util \
--enable-ssl-staticlib-deps \
# Jackie's Universal Cartographics System Code Decoder
# Kay Johnston
# Now with added elegance.
# Updated & Improved by VitaminArrr
import sys
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
divisor = len(alphabet)
@gistya
gistya / terroin.txt
Last active August 29, 2015 14:19
Reed Heroin, written in 2010
This is a letter I sent to President Diver in 2010.
Jon Gilbert '03, Senate/Quest Board 2001
---
Reed is not responsible for the increase in heroin deaths; the Taliban, the US Government, and the UN are responsible for it. This is a known fact proven by data and admitted by officials -- the war has directly resulted in a heroin epidemic that has spread across the entire world. I will detail the proof of this in the following paragraphs.
Statistically, Reed's yearly average student death rate from drugs and alcohol is far lower than the national average for college students. Obviously we would never wish to see a student die for any reason, but the fact is that statistically, over the course of a decade, there are very likely going to be some 5-10 deaths from drug and alcohol abuse in a population segment with the size and age of Reed's student body, located in an urban area. In fact, each year in the range of 2002-2008, according to Drug Abuse Warning Network statistics (1), you can expect to see about 3 em
@gistya
gistya / efficiency.txt
Last active August 29, 2015 14:19
Read this
Theorem.
Reed could improve the efficiency of its methods of updating its policies like DHSM, and could thereby improve the effectiveness of those policies, by adopting some tools and methods commonly used to manage cross-team software development inside companies like Apple, Google, Microsoft, and Nike. The tools and methods I speak of were made for collaboratively developing code, which could include community policies.
Explanation.
Before we deploy a major software update to a live server, we run it through copious codified test suites, then deploy to a mock server and have QA monkeys try as hard as possible to break it. When we finally deploy to a live server, we monitor it closely for problems, with one finger on the "roll-back" button, the rest of the fingers ready to whip up an emergency hotfix. Murphy's Law dictates that major updates will always have unforeseen issues, because they can. Some subset of users inevitably hates the new features that you added in response to a flood of complaints from
11/4/14 12:41:55.000 AM kernel[0]: hfs_swap_BTNode: record #-1 invalid offset (0x0000)
11/4/14 12:41:55.000 AM kernel[0]: hfs: node=10097 fileID=8 volume=Besty 5 device=/dev/disk8s2
11/4/14 12:41:55.000 AM kernel[0]: hfs: Runtime corruption detected on Besty 5, fsck will be forced on next mount.
11/4/14 12:41:55.000 AM kernel[0]: hfs_swap_BTNode: record #-1 invalid offset (0x0000)
11/4/14 12:41:55.000 AM kernel[0]: hfs: node=10097 fileID=8 volume=Besty 5 device=/dev/disk8s2
11/4/14 12:41:55.000 AM kernel[0]: hfs: Runtime corruption detected on Besty 5, fsck will be forced on next mount.
11/4/14 12:41:55.000 AM kernel[0]: hfs_swap_BTNode: record #-1 invalid offset (0x0000)
11/4/14 12:41:55.000 AM kernel[0]: hfs: node=10097 fileID=8 volume=Besty 5 device=/dev/disk8s2
11/4/14 12:41:55.000 AM kernel[0]: hfs: Runtime corruption detected on Besty 5, fsck will be forced on next mount.
11/4/14 12:41:55.000 AM kernel[0]: hfs_swap_BTNode: record #-1 invalid offset (0x0000)
@gistya
gistya / Doctrine ODM MongoDB PHP test.php
Created October 9, 2014 21:28
Doctrine ODM MongoDB PHP test
<?php
/**
* set up Doctrine
*/
use Doctrine\MongoDB\Connection;
use Doctrine\ODM\MongoDB\Configuration;
use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver;
@gistya
gistya / issues with innodb
Created August 15, 2014 21:00
magento/innodb issues
140815 0:14:55 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140815 0:14:55 [Note] Plugin 'FEDERATED' is disabled.
140815 0:14:55 InnoDB: The InnoDB memory heap is disabled
140815 0:14:55 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140815 0:14:55 InnoDB: Compressed tables use zlib 1.2.3.4
140815 0:14:55 InnoDB: Initializing buffer pool, size = 256.0M
140815 0:14:55 InnoDB: Completed initialization of buffer pool
140815 0:14:55 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 2035192434
140815 0:14:55 InnoDB: Database was not shut down normally!
INSERT INTO `catalog_product_index_price_bundle_tmp` SELECT `e`.`entity_id`, `cg`.`customer_group_id`, `cw`.`website_id`, IF(IF(IFNULL(tas_tax_class_id.value_id, -1) > 0, tas_tax_class_id.value, tad_tax_class_id.value) IS NOT NULL, IF(IFNULL(tas_tax_class_id.value_id, -1) > 0, tas_tax_class_id.value, tad_tax_class_id.value), 0) AS `tax_class_id`, 1 AS `price_type`, IF(IF(IF(IFNULL(tas_special_from_date.value_id, -1) > 0, tas_special_from_date.value, tad_special_from_date.value) IS NULL, 1, IF(IF(IFNULL(tas_special_from_date.value_id, -1) > 0, tas_special_from_date.value, tad_special_from_date.value) <= cwd.website_date, 1, 0)) > 0 AND IF(IF(IFNULL(tas_special_to_date.value_id, -1) > 0, tas_special_to_date.value, tad_special_to_date.value) IS NULL, 1, IF(IF(IFNULL(tas_special_to_date.value_id, -1) > 0, tas_special_to_date.value, tad_special_to_date.value) >= cwd.website_date, 1, 0)) > 0 AND ta_special_price.value > 0 , ta_special_price.value, 0) AS `special_price`, tp.min_price AS `tier_percent`, IF(ta_price.v
@gistya
gistya / BundlePricesPatchFileChanges.diff
Created April 23, 2014 01:12
BundlePricesPatchFileChanges.diff: add local overrides for files to fix the bulde price method. still haven't made any changes *to* these files yet though
From 72bbed942cd0d3ab8e70233f6b986ee4c517fb9a Mon Sep 17 00:00:00 2001
From: Gistya Eusebio <gistya@gmail.com>
Date: Tue, 22 Apr 2014 18:07:32 -0700
Subject: [PATCH] add local overrides for files to fix the bulde price method.
still haven't made any changes *to* these files yet though.
---
.../Product/Edit/Tab/Attributes/Special.php | 43 +
app/code/local/Mage/Bundle/Model/Product/Price.php | 975 +++++++++++++++++++++
.../Mage/Bundle/Model/Resource/Indexer/Price.php | 698 +++++++++++++++