Skip to content

Instantly share code, notes, and snippets.

View vamsiikrishna's full-sized avatar
🎯

Vamsi Krishna B vamsiikrishna

🎯
  • Bengaluru - India
View GitHub Profile
@umpirsky
umpirsky / list.md
Last active April 23, 2021 10:10
Symfony e-commerce solutions.
@paulstatezny
paulstatezny / patterns-of-enterprise-application-architecture.md
Last active April 24, 2024 12:26
Notes from Patterns of Enterprise Application Architecture by Martin Fowler

Patterns of Enterprise Application Architecture

By Martin Fowler (2002)

Chapter 1: Layering

A basic example of layering: FTP < TCP < IP < Ethernet

Benefis of layering:

  • You can understand a layer without knowing much about the others.
  • Minimize dependencies.
"""
This file contains code that, when run on Python 2.7.5 or earlier, creates
a string that should not exist: u'\Udeadbeef'. That's a single "character"
that's illegal in Python because it's outside the valid Unicode range.
It then uses it to crash various things in the Python standard library and
corrupt a database.
On Python 3... well, this file is full of syntax errors on Python 3. But
if you were to change the print statements and byte literals and stuff:
@jonathonbyrdziak
jonathonbyrdziak / magento.conf
Last active June 18, 2020 17:55
A configuration file for magento under nginx.
#####################################################
#
# Provided by the Magento Support Center
# http://magentosupport.help/knowledgebase/configuring-nginx-to-work-with-magento-advanced/
#
# Your Magento Tutorial specialists
#
server {
listen *:8080;
server_name fanatik.redrokk.com www.fanatikbike.com fanatikbike.com;
@ukd1
ukd1 / decrypt.sh
Created November 15, 2013 18:59
Super simple shell scripts we use at www.rainforestqa.com for encrypting / decrypting / updating our Heroku apps with private environment variables
#!/bin/bash
gpg qa.txt.asc
gpg staging.txt.asc
gpg production.txt.asc
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@jwalton
jwalton / Github Milestone Dashing Widget.md
Last active July 30, 2020 23:17
Dashing Widget to Display Next Git Milestone

This will show your next GitHub milestone as a Dashing widget. Built on top of the Text widget.

To use:

  • Add the following to your gemfile:

  •   gem 'rest-client'
    
  • Replace the git_token, git_owner, and git_project in git-milestone.rb as appropriate.

@silviuvoicu
silviuvoicu / BookController.php
Created August 20, 2013 07:39
Spec with phpspec a symfony2 controller. I know which is the normal work flow: write first the spec, and then the code, but in order to understand better how to spec a symfony2 controller, I first create a simple book entity with just id and name, and then with the help of generators I created a crud system, which I modified a little. Then havin…
<?php
namespace Acme\DemoBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Acme\DemoBundle\Entity\Book;
@sheeep
sheeep / UserNamer.php
Last active February 25, 2016 13:19
A user namer for OneupUploaderBundle.
<?php
namespace Acme\DemoBundle;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\Security\Core\SecurityContext;
use Oneup\UploaderBundle\Uploader\Naming\NamerInterface;
class UserNamer implements NamerInterface
{
@addyosmani
addyosmani / headless.md
Last active May 1, 2024 03:05
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.