Skip to content

Instantly share code, notes, and snippets.

View tworzenieweb's full-sized avatar

Łukasz Adamczewski tworzenieweb

View GitHub Profile
@docteurklein
docteurklein / silex_app.php
Created April 8, 2011 16:19
a little silex app to show doctrineExtension capabilities
<?php
require_once __DIR__.'/../Silex/silex.phar';
use Silex\Extension\DoctrineExtension;
$app = new Silex\Application;
$app->register(new DoctrineExtension, array(
'doctrine.dbal.connection_options' => array(
@ziadoz
ziadoz / awesome-php.md
Last active July 13, 2024 05:29
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@beberlei
beberlei / CommandMethodMapper.php
Created November 24, 2012 23:51
Symfony Form DataMapper that uses a command method to write data back on object
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@stantonk
stantonk / multitail.sh
Created February 27, 2013 21:43
Unified tail -f of a log file across multiple hosts via ssh.
#!/bin/bash
HOSTS=(PUT, YOUR, HOSTS, HERE)
CMD="tail -f logs/api.log"
echo "Hit CTRL-C to stop"
sleep 0.5
PIDS=""
for host in ${HOSTS[*]}
do
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@pedroborges
pedroborges / phpspec_cheatsheet.md
Last active April 23, 2016 09:27
From Marcello Duarte's PhpSpec 2.0 ilustrated by examples slides (http://pt.slideshare.net/marcello.duarte/phpspec-20-ilustrated-by-examples)

PhpSpec 2.0 Cheat Sheet

Object: $result ($this)

Expectation: should or shouldNot

Matcher: Be...()

Types of Matchers:

@esfand
esfand / typescript_angular.adoc
Last active September 30, 2022 12:37
AngularJS with TypeScript
@kennwhite
kennwhite / multi_key_crypto.sh
Last active January 16, 2024 15:47
OpenSSL command line recipe for multi-public key file encryption. Any single private key paired to one of the public keys can decrypt the file.
#!/usr/bin/env bash
#
# Example of multiple key AES encryption for text files using the openssl v. 0.9.8+ command line utility
# Uses n public certs as key for MIME PKCS envelope, any individual private key can decrypt.
#
# If standard RSA ssh keys exist, these can be converted to public certs as well (and ssh keys can decrypt)
#
# To sign (and verify) the encrypted file, one of the private keys is required, see:
# http://www.openssl.org/docs/apps/smime.html#EXAMPLES for openssl smime examples
# or http://www.openssl.org/docs/apps/cms.html#EXAMPLES for cms utility (OpenSSL v. 1.0+)
@SiZapPaaiGwat
SiZapPaaiGwat / webpack.nginx.conf
Last active November 19, 2021 19:10
webpack-dev-server configuration in nginx on development server
upstream ws_server {
server 127.0.0.1:8080;
}
server {
listen 80;
server_name 10.1.2.225;
location / {
proxy_pass http://ws_server/;