Skip to content

Instantly share code, notes, and snippets.

@slavcodev
slavcodev / вопросы-для-IT-собеседования
Created June 5, 2014 08:14
Нормальные вопросы для IT-собеседования
Вы ранее привлекались за хранение данных в глобальных переменных?
Вы когда-нибудь делали .Net за деньги?
Сформулируйте зависимость времени исправления критического бага от seniority присутствующего менеджера
В своём резюме вы указали знание php. вам не стыдно?
Перед вами кисть, холст и мольберт. напишите компилятор
@hlashbrooke
hlashbrooke / class.php
Created February 28, 2014 08:37
A complete, versatile options page class for any WordPress plugin
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
class WordPress_Plugin_Template_Settings {
private $dir;
private $file;
private $assets_dir;
private $assets_url;
private $settings_base;
@alettieri
alettieri / Vagrantfile
Last active February 3, 2021 19:41
Vagrantfile and LAMP provisioning script. This is a set of scripts composed for a WordPress meetup talk. http://www.meetup.com/wordpress-sf/events/144084162/ The vagrantfile will build a lucid32 machine, then kicks off some provision scripts: provision.sh: Install LAMP stack, Ruby, SASS and Compass. apache.sh Updates the default apache config fi…
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@corny
corny / install_zend_guard.sh
Created April 3, 2013 14:16
Installation of Zend Guard 5.5.0 using PHP 5.3 and Ubuntu 12.04 (64 bit).
#!/bin/bash
cd /root
wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
tar xzf ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
cp ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x/ZendGuardLoader.so /usr/lib/php5/20090626/
file=/usr/lib/php5/20090626/ZendGuardLoader.so
echo zend_extension=$file > /etc/php5/conf.d/zend_extensions.ini
chmod 644 $file
@gagarine
gagarine / template.tpl.php
Created July 29, 2012 21:11
Working with drupal theme_menu_tree
<?php
/**
* Theme_menu_tree doesn't provide any context information
* THIS SUCKS
* But you can use hook_block_view_alter to change the theme wrapper
* OUF!
*/
function MYTHEME_menu_tree(&$variables) {