Skip to content

Instantly share code, notes, and snippets.

View feyyazesat's full-sized avatar

Feyyaz Esatoglu feyyazesat

View GitHub Profile
@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
@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 / 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 / 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 / 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.