Skip to content

Instantly share code, notes, and snippets.

View Maharramoff's full-sized avatar
🇦🇿

Maharramoff

🇦🇿
View GitHub Profile
@Maharramoff
Maharramoff / git-layout-for-client-customizations.txt
Created January 23, 2021 09:51 — forked from abeham/git-layout-for-client-customizations.txt
Discusses approaches to structure a git repository for software that is customized for several clients
Consider a software that is customized for each client. It contains common components, modules, and
client-specific customizations thereof. For instance,
Common
+ Common.ClientA
+ Common.ClientB
ModuleA
+ ModuleA.ClientB
ModuleB
+ ModuleB.ClientA
@Maharramoff
Maharramoff / covertToHierarchy.php
Created January 11, 2021 21:34 — forked from ubermaniac/covertToHierarchy.php
Convert a DB result of parent/child items into a hierarchical array
<?php
// -- Only one caveat : The results must be ordered so that an item's parent will be processed first.
// -- Simulate a DB result
$results = array();
$results[] = array('id' => 'a', 'parent' => '', 'name' => 'Johnny');
$results[] = array('id' => 'b', 'parent' => 'a', 'name' => 'Bobby');
$results[] = array('id' => 'c', 'parent' => 'b', 'name' => 'Marky');
$results[] = array('id' => 'd', 'parent' => 'a', 'name' => 'Ricky');
@Maharramoff
Maharramoff / bitbucket-pipeline.yml
Created January 5, 2021 00:02 — forked from juniorb2ss/bitbucket-pipeline.yml
Bitbucket Pipeline Deploy Laravel to Elasticbeanstalk using parallel steps
image: atlassian/default-image:2
definitions:
services:
redis:
image: redis:3.2
memory: 512
mysql:
image: mysql:5.7
environment:
@Maharramoff
Maharramoff / 01_add_cors.config.yaml
Created January 4, 2021 20:44 — forked from vsviridov/01_add_cors.config.yaml
Add CORS to Nginx on AWS Elastic Beanstalk
container_commands:
01_fix_static_cors:
command: "/tmp/fix_static_cors.sh"
files:
"/tmp/fix_static_cors.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# You can specify a custom docker image from Docker Hub as your build environment.
# run composer check-platform-reqs for a list of required extensions.
image: php:7.2-fpm
pipelines:
default:
# Not needed unless you're doing feature tests.
# - step:
@Maharramoff
Maharramoff / Sortable.jsx
Created July 8, 2020 09:31 — forked from superKalo/ Sortable.jsx
How to use jQuery UI with React JS? You can use this approach to integrate almost any jQuery plugin! Full details and explanation here: http://stackoverflow.com/a/40350880/1333836
class Sortable extends React.Component {
componentDidMount() {
// Every React component has a function that exposes the
// underlying DOM node that it is wrapping. We can use that
// DOM node, pass it to jQuery and initialize the plugin.
// You'll find that many jQuery plugins follow this same pattern
// and you'll be able to pass the component DOM node to jQuery
// and call the plugin function.
@Maharramoff
Maharramoff / delete_not_found_files_in_db.php
Created June 19, 2020 20:04
Delete files from folder that are not in the database
<?php
// Fayllar olan qovluğun ünvanı
$path = realpath('folder');
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));
foreach ($files as $file)
{
$fileBaseName = $file->getBasename();
@Maharramoff
Maharramoff / 200-free-educational-resources-for-K-12-students.md
Last active June 4, 2020 12:21
200 Free Kids Educational Resources: Video Lessons, Apps, Books, Websites & More

Home Schooling Resources During COVID-19

npm cache clean --force
rm -rf node_modules
npm install