Skip to content

Instantly share code, notes, and snippets.

View piotrkubisa's full-sized avatar
🐱
Set status

Piotr Kubisa piotrkubisa

🐱
Set status
View GitHub Profile
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@darktable
darktable / app.yaml
Created March 16, 2011 19:10
GAE: App.yaml designed for serving a static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May not be neces
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest
@igorw
igorw / index.php
Created April 20, 2011 23:41
Silex TranslationExtension usage
<?php
require __DIR__.'/silex.phar';
$app = new Silex\Application();
$app->register(new Silex\Extension\TranslationExtension(), array(
'translation.class_path' => __DIR__.'/vendor',
));
@igorw
igorw / silex-php+twig+TwigBrige+translation.php
Created November 5, 2011 11:53 — forked from mTorres/silex-php+twig+TwigBrige+translation.php
Gist Sample to enable Twig + TwigTranslation bridge to Silex
<?php
require_once __DIR__ . '/../lib/vendor/Silex/silex.phar';
$app = new Silex\Application();
$app['debug'] = true;
// Registering Symfony\Yaml and Symfony\Config
$app['autoloader']->registerNamespace('Symfony', __DIR__.'/../lib/vendor/symfony/src');
@mattbaker
mattbaker / README
Created December 22, 2011 06:02
SVG to PNG render with Node and D3.js
This example expects to have d3.min.js and d3.layout.min.js in the same directory as pie.js and pie_serv.js.
Run with node pie_serv.js
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@vivien
vivien / fossil.bash_completion
Created June 5, 2012 01:39
A bash_completion file for Fossil SCM, as /etc/bash_completion.d/git works for Git, providing a __fossil_ps1 bash function, and other tools.
# Bash completion support for Fossil.
# It is based on the Git Bash completion file.
# It best fits in /etc/bash_completion.d/fossil
#
# Copyright (C) 2011 Vivien Didelot <[email protected]>
# This file is distributed under the same terms as the license of the Fossil project.
#
# This file contains routine to change your PS1, and helper functions.
#
# For instance, add those options to your bashrc to customize PS1:
@smottt
smottt / ts3.php
Created September 9, 2012 09:52
Post msgs to Teamspeak3 instance
<?php
namespace Acme\Demo;
// some configuration
$all_channels = true;
$bot_name = 'TS3 BOT';
$msg = 'Hello World!';
$url = vsprintf('serverquery://username:[email protected]:10011/?server_port=9987&nickname=%s', array(
@quoidautre
quoidautre / gist:3781733
Created September 25, 2012 13:11
PHP: PDO snippets
// PDO Connection to MySQL
$conn = new PDO('mysql:host=localhost;dbname=yourdbname', 'username', 'password');
// PDO Connection to PostgreSQL
$conn = new PDO('pgsql:host=localhost;dbname=yourdbname', 'username', 'password');
// A quick Select Query with For Loop
foreach ($conn->query("SELECT * FROM profile") as $row)
echo $row['fullname'];
@DaRaFF
DaRaFF / ubuntu-php-development-environment.md
Last active October 13, 2023 00:16
Ubuntu php development environment

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!

I hope it helps you too!

fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup