Skip to content

Instantly share code, notes, and snippets.

View khusseini's full-sized avatar
🍉
Free Palestine

Khairi Husseini khusseini

🍉
Free Palestine
View GitHub Profile
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="0" height="0" style="position:absolute">
<symbol id="ada" viewBox="0 0 240 240">
<path d="M108.4 70.5c.4 1.5.7 2.6.7 2.6l.4 1.9s.1 1 .5 1.4c.4.4 1.4.2 1.4.2s2.6-.4 4.4-.4h8.4c1.9 0 4.4.4 4.4.4s1 .2 1.4-.2c.4-.4.5-1.4.5-1.4l.4-1.9s.2-1.2.7-2.6c.2-.6.6-1.9.8-2.3.2-.4 1.1-2.7 1.1-2.7s-1.7-1.5-3.5-.5c-1.2.6-1.6 1.9-1.6 1.9s-3 .3-2.9 2.6c.1 1.8 1.6 2.6 1.6 2.6s-.5 1.5-2 1.5c-1.4 0-2.2-1.2-2.2-1.2s2.5-.4 2.4-2.8c-.1-2.2-2.7-2.3-2.7-2.3s.2-1.3-.6-2.1c-.8-.7-1.9-.6-1.9-.6s-1.1-.1-1.9.6c-.9.8-.6 2.1-.6 2.1s-2.6.1-2.7 2.3c-.1 2.3 2.4 2.8 2.4 2.8s-.8 1.2-2.2 1.2c-1.5 0-2-1.5-2-1.5s1.5-.8 1.6-2.6c.1-2.3-2.9-2.6-2.9-2.6s-.4-1.3-1.6-1.9c-1.8-1-3.5.5-3.5.5s1 2.3 1.1 2.7c0 .4.4 1.8.6 2.3m3.2 14h.2c2.5.1 3.2-.1 3.4-.8v-.2.2l-.6-1.2-1.9-3c-.9-1.9-3.2-2.7-4.4-2.4-1.3.3-2.1 1.2-2.1 2.5s.4 2.6 1.3 3.6c1.2 1.2 2.6 1.3 4.1 1.3m-3-6.2c.8-.2 2.5.4 3.1 1.8l2 3.2s0 .1.1.1c-.3 0-.9.1-1.9 0h-.3c-1.4 0-2.5-.1-3.2-.9-.7-.8-1.1-1.8-1-2.8 0-.8.
@khusseini
khusseini / underscore.php
Last active October 10, 2015 06:17 — forked from troelskn/underscore.php
camelize + underscore in php
<?php
/**
* Transforms an under_scored_string to a camelCasedOne
*/
function camelize($scored) {
return preg_replace('/[-_]([a-z])/e', 'strtoupper("$1")', $scored);
}
/**
* Transforms a camelCasedString to an under_scored_one
@khusseini
khusseini / .vimrc
Last active September 2, 2016 11:11
Workstation
syntax on
set nocompatible
set number
set backspace=2
set tabstop=4
set shiftwidth=4
set expandtab
filetype off
@khusseini
khusseini / gist:612955fcf9e719253ee5a00700e06d0f
Created May 12, 2017 14:31
Git checkout branch problems
$ git branch -a
* develop
remotes/infolox/17-404-page-design
remotes/infolox/24-flash-messages-integration
remotes/infolox/27-wishlist-implementation
remotes/infolox/28-admin-panel-showing-fixing2
remotes/infolox/anton-current
remotes/infolox/contact-form
remotes/infolox/develop
remotes/infolox/feature/shop-bundle
app/config
├── config_dev.yml
├── config_prod.yml
├── config_test.yml
├── config.yml
├── dist
├── parameters.php
├── parameters_test.yml.dist
├── parameters.yml
├── parameters.yml.dist
[Unit]
Description=Provides Docker-Compose
After=docker.service
Requires=docker.service
[Service]
Type=oneshot
ExecStart=/bin/bash -c "wget -O /opt/bin/docker-compose https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m`"
@khusseini
khusseini / Makefile
Last active March 18, 2022 03:28
Update your #hosts file to point to #docker #container #ip
Update your hosts file to point to docker container ip
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
.SUFFIXES:
##Option: Development domain
domain = mysite.development.local
container = mysite
<?php
namespace App\Form\Extension;
use CoreShop\Bundle\OrderBundle\Form\Type\CartItemType;
use CoreShop\Component\Core\Model\CartItemInterface;
use Pimcore\Model\DataObject\AbstractObject;
use Pimcore\Model\DataObject\CoreShopProduct;
use Pimcore\Model\DataObject\Objectbrick\Data\AbstractData;
use Symfony\Component\Form\AbstractTypeExtension;
@khusseini
khusseini / README.md
Last active August 25, 2022 04:04
Adding traefik to LKS

Setup Traefik 2.2 with Let's Encrypt On LKE

If you searched for this article I chances are you know what LKE, Traefik and Let's Encrypt are, else here is a quick primer:

What is LKE?

"The Linode Kubernetes Engine (LKE) is a fully-managed container orchestration engine for deploying and managing containerized applications and workloads.". For more information please have a look at "Deploy and manage a cluster with Linode Kubernetes Engine"

{
"ROOT": {
"type": {
"resolvedName": "MiroraShop"
},
"isCanvas": true,
"props": {
},
"displayName": "Canvas",