Skip to content

Instantly share code, notes, and snippets.

View feyyazesat's full-sized avatar

Feyyaz Esatoglu feyyazesat

View GitHub Profile
@jakzal
jakzal / Doctrine.php
Last active September 14, 2020 13:19
Use Doctrine and Symfony Kernel in phpunit tests
<?php
declare(strict_types=1);
namespace SymfonyLive\Mastermind\Adapters\Database;
use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ORM\Tools\SchemaTool;
use RuntimeException;
@paulochf
paulochf / countries.sql
Last active April 26, 2024 09:50 — forked from adhipg/countries.sql
Outdated. Used with discretion. Accepting updates.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- http://www.alexedwards.net/blog/golang-response-snippets
- https://devcharm.com/articles/8/go-nethttp-handlers/
- http://openmymind.net/Things-I-Wish-Someone-Had-Told-Me-About-Go/
- https://elithrar.github.io/article/custom-handlers-avoiding-globals/
- https://elithrar.github.io/article/map-string-interface/
- https://elithrar.github.io/article/approximating-html-template-inheritance/
- http://blog.golang.org/error-handling-and-go
- https://golang.org/doc/articles/wiki/
- https://medium.com/@benbjohnson/structuring-applications-in-go-3b04be4ff091
- https://justinas.org/best-practices-for-errors-in-go/
@lantins
lantins / proxy_writer.go
Created January 5, 2015 20:11
proxy_writer.go
// proxyWriter is used to track final status and size of the
// response sent to the client
type proxyWriter struct {
http.ResponseWriter
status int
size int
}
func (r *proxyWriter) Header() http.Header {
return r.ResponseWriter.Header()
<?php
namespace XaTestBundle\Doctrine;
use XaTestBundle\Doctrine\Connections\TwoPhaseConnection;
class TransactionManager
{
protected $connections = [];
public function __construct($connections = [])
imports:
- { resource: parameters.yml }
- { resource: security.yml }
framework:
#esi: ~
#translator: { fallback: %locale% }
secret: %secret%
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@bdecarne
bdecarne / deploy.rb
Last active December 31, 2015 22:19
parameters.yml configuration during capifony deployment for Symfony2
set :application, "My App"
set :domain, "domain.com"
set :deploy_to, "/home/domain/www"
set :app_path, "app"
set :user, "deploy"
set :use_sudo, false
# default_run_options[:pty] = true
set :repository, "git@xxx.com:project"
@matteocaberlotto
matteocaberlotto / deploy-symfony.sh
Last active April 20, 2022 14:51
Deploy symfony 2+ applications (multiple environment)
#!/bin/bash
# include config
# config example below:
#
#
# Example deploy_config.sh
#
# dev_env() {
@routelastresort
routelastresort / gist:6437206
Created September 4, 2013 13:51
example ansible playbook for digitalocean
---
- digital_ocean: >
state=present
command=ssh
name={{ digitalocean.sshkeyname }}
ssh_pub_key="{{ digitalocean.sshkey }}"
client_id={{ digitalocean.clientid }}
api_key={{ digitalocean.apikey }}
- digital_ocean: >