Skip to content

Instantly share code, notes, and snippets.

@yitznewton
yitznewton / symfony_config_multi.yml
Created June 6, 2011 18:45
Array for config setting in symfony
# non-obvious and sub-well-documented method to retrieve multiple values for
# config setting, e.g. sfConfig::get('app_offsite-testing-ip-addresses')
all:
.options:
offsite-testing-ip-addresses:
- 192.168.35.184
- 192.168.87.113
@yitznewton
yitznewton / gist:1664874
Created January 23, 2012 18:57
symfony 1.4 widget and validator for Doctrine ENUM type
<?php
/*
* This file is part of the symfony package.
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
* (c) Jonathan H. Wage <jonwage@gmail.com>
* (c) Kevin Cyster <kcyster@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@yitznewton
yitznewton / resume.md
Created March 18, 2012 00:57
yitznewton Resume

Yitzchak Schaffer

I have been working with a consortial college library system since 2007. Having spent this time teaching myself web development, I would like to join a small web team, whether independent or part of a larger company. I have recently been experimenting with Scrum methodology, and would be particularly interested in continuing. As an introvert and self-starter, I excel in a quiet work environment as an autonomous part of a team. My development to this point has been mostly solo, and I am looking forward to working with and learning from other developers.

@yitznewton | yitznewton@hotmail.com

Web Developer

@yitznewton
yitznewton / gist:2510581
Created April 27, 2012 16:27
Job description (Touro)

Mid-level PHP Developer / Linux Administrator (Lower Manhattan)

Reports to: Associate Director of Libraries

Status: Full Time/35 hrs. per week

FLSA: Exempt

Location: Lower Manhattan

@yitznewton
yitznewton / gist:2588746
Created May 3, 2012 19:44
Touro College Libraries Web Services Manager

Job Summary

This position is responsible for the maintenance of web services on a single Ubuntu server, as well as new development. All major development to date has been done in PHP, with our main site on Drupal, several MVC applications on symfony, and a single application on the Kohana framework. We also use a small Perl-based utility for a certain batch operation which is not under active development.

Other than perhaps our main Drupal site, our Electronic Resource Management System (ERMS) is our most mission-critical. It is responsible for negotiating HTTP traffic between our endusers and licensed scholarly content on vendor servers behind a paywall. The ERMS is a symfony application.

Touro College and University System consists of a network of affiliated institutions. Beyond the 14 core sites that make up Touro College New York (TCNY), we have a number of divisions more or less tightly connected in several states on both coasts, as well as overseas. Our ERMS serves all of these users, whi

@yitznewton
yitznewton / provider_vitals.xml
Created May 23, 2012 15:11
Sample skeleton XML MOLO2 spec
<set name="provider">
<field name="id" sqlName="provider_id" />
<field name="display_title" />
<field name="gender" />
<sql>
SELECT
p.provider_id,
p.display_title,
p.gender
@yitznewton
yitznewton / gist:2960563
Created June 20, 2012 15:41
K&R Exercise 1-20: detab
#include <stdio.h>
#define MAXLINE 1000
#define TABWIDTH 4
int slurp_into(char input[]);
void output_detabbed(char input[], int length);
void output_spaces(int how_many);
int main()
@yitznewton
yitznewton / knock_knock.c
Created July 11, 2012 18:56
Knock-knock telnet server
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <signal.h>
int listener_global;
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list
sudo aptitude update
sudo aptitude install \
build-essential ia32-libs \
gcc \
apache2 \
php5 php-pear php-apc php5-xmlrpc php5-xsl php5-xdebug php5-pgsql php5-mcrypt php5-curl php5-cli php5-sqlite php5-dev \
sqlite3 \
@yitznewton
yitznewton / .vimrc
Last active October 7, 2015 08:38
Linux vimrc
set shiftwidth=4
set tabstop=4
set hidden
set autoindent
set cc=76
autocmd BufReadPost * :DetectIndent
let g:detectindent_preferred_expandtab=0
let g:detectindent_preferred_indent=4