Skip to content

Instantly share code, notes, and snippets.

View feyyazesat's full-sized avatar

Feyyaz Esatoglu feyyazesat

View GitHub Profile
@feyyazesat
feyyazesat / sf2Exceptions
Created September 23, 2014 18:17
Symfony 2 Exception List
Symfony/Component/OptionsResolver/Exception/MissingOptionsException.php
Symfony/Component/OptionsResolver/Exception/OptionDefinitionException.php
Symfony/Component/OptionsResolver/Exception/InvalidOptionsException.php
Symfony/Component/Serializer/Exception/InvalidArgumentException.php
Symfony/Component/Serializer/Exception/UnsupportedException.php
Symfony/Component/Serializer/Exception/UnexpectedValueException.php
Symfony/Component/Serializer/Exception/LogicException.php
Symfony/Component/Serializer/Exception/Exception.php
Symfony/Component/Serializer/Exception/RuntimeException.php
Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@feyyazesat
feyyazesat / blockstack.id
Created November 8, 2017 21:01
Blockstack ID verification
Verifying my Blockstack ID is secured with the address 1NxhVEagZophCbq766T6QMZquyeYJ5bsf https://explorer.blockstack.org/address/1NxhVEagZophCbq766T6QMZquyeYJ5bsf
@feyyazesat
feyyazesat / violation-of-encapsulation-example.php
Created October 4, 2017 11:31
Violation of Encapsulation Example
<?php
/*
Following Explanation From Wikipedia
https://en.wikipedia.org/wiki/Encapsulation_(computer_programming)
Encapsulation is used to hide the values or state of a structured data object inside a class
*/
class AClass {
private $propertyDoesntViolateEncapsulation = 0;
private static $propertyViolatesEncapsulation = 0;
@feyyazesat
feyyazesat / main.c
Last active April 14, 2017 11:41
parallel programming : pi calculation.
#include <stdio.h>
#include <omp.h>
double piCalculation() {
static int num_total_steps = 100000;
int num_steps = (num_total_steps / omp_get_num_threads());
double step;
double sum = 0.0;
double execution_time = omp_get_wtime();
step = 1.0 / (double) num_total_steps;
@feyyazesat
feyyazesat / ext_stmt.txt
Created March 16, 2016 10:13
PHP EXT_STMT opcode training.
1. input -> empty file
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
2 0 E > > RETURN 1
2. input -> '<?php'
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
@feyyazesat
feyyazesat / multicomposer.sh
Last active December 24, 2015 13:30
Composer multiplier
#!/bin/bash
export SYMFONY_APP=$1
composer ${@:2}
# --usage ./multicomposer.sh api install
{
"events":[
{
"title":"the foo party",
"lat":1111,
"long":1111,
"description":"go to the party, surely you will have fun!",
"startDate":1111 // unixtimestamp
}
]
# Symfony bin path
set :bin_path, "bin"
# Symfony var path
set :var_path, "var"
# Symfony console path
set :symfony_console_path, fetch(:bin_path) + "/console"
# Symfony log path
#!/bin/bash
# include config
# config example below:
#
#
# Example deploy_config.sh
#
# dev_env() {