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!
\
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace XaTestBundle\Doctrine; | |
use XaTestBundle\Doctrine\Connections\TwoPhaseConnection; | |
class TransactionManager | |
{ | |
protected $connections = []; | |
public function __construct($connections = []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imports: | |
- { resource: parameters.yml } | |
- { resource: security.yml } | |
framework: | |
#esi: ~ | |
#translator: { fallback: %locale% } | |
secret: %secret% | |
router: | |
resource: "%kernel.root_dir%/config/routing.yml" | |
strict_requirements: ~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, "[email protected]:project" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# include config | |
# config example below: | |
# | |
# | |
# Example deploy_config.sh | |
# | |
# dev_env() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- digital_ocean: > | |
state=present | |
command=ssh | |
name={{ digitalocean.sshkeyname }} | |
ssh_pub_key="{{ digitalocean.sshkey }}" | |
client_id={{ digitalocean.clientid }} | |
api_key={{ digitalocean.apikey }} | |
- digital_ocean: > |
NewerOlder