Skip to content

Instantly share code, notes, and snippets.

@steve-todorov
steve-todorov / bulgarian.regions.and.cities.sql
Created February 3, 2014 15:50
Bulgarian Regions & Cities (PostgreSQL)
-- Regions
CREATE TABLE regions(
region_id SERIAL PRIMARY KEY,
name character varying(255)
);
-- Cities
CREATE TABLE cities (
city_id SERIAL PRIMARY KEY,
region_id integer,
@aras-p
aras-p / preprocessor_fun.h
Last active May 16, 2025 11:21
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@ma2thieu
ma2thieu / cc.php
Created February 29, 2012 17:20
script to delete Symfony2 cache folder from the browser
<?php
// --- cache location
$cache_dir = dirname(__FILE__) . '/../app/cache';
echo "<b>cache_dir : $cache_dir</b>";
// ---
function rrmdir($dir) {
if (is_dir($dir)) {