Skip to content

Instantly share code, notes, and snippets.

View vuchkov's full-sized avatar
😀

Ilcho Vuchkov vuchkov

😀
View GitHub Profile
@willurd
willurd / web-servers.md
Last active July 12, 2024 11:21
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@facine
facine / __INDEX.txt
Last active August 6, 2023 15:33
Drupal 8 - Examples
# Taxonomy terms:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_taxonomy_term-php
# Menu links:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_menu_link-php
# File items:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_file-php
# Nodes:
@JeffreyWay
JeffreyWay / CommunityLinksQuery.php
Created August 3, 2016 20:12
Consider Query Objects source.
<?php
namespace App\Queries;
use App\CommunityLink;
class CommunityLinksQuery
{
/**
* Fetch all relevant community links.
@leymannx
leymannx / AddAnotherItem.php
Last active July 29, 2021 10:29
Drupal 8 Ajax Form Add Item Example
<?php
/**
* @file
* Contains \Drupal\hello_world\Form\AddAnotherItem.
*/
namespace Drupal\hello_world\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
@CMCDragonkai
CMCDragonkai / integrating_wordpress_with_composer.md
Last active February 11, 2019 20:49
Integrating Wordpress with Composer #php #wordpress

Integrating Wordpress with Composer

Setup the project directory:

mkdir wordpress-composer
cd wordpress-composer
@Guibzs
Guibzs / .htaccess
Last active March 26, 2023 15:17
Symfony 4 ~ .htaccess
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /index.php/
@mariacha
mariacha / custom_twig.info.yml
Created January 24, 2019 16:25
Custom Twig functions Drupal 8
name: Custom twig
type: module
description: Custom Twig functions
core: 8.x
package: Custom
@vuchkov
vuchkov / custom_twig.info.yml
Created January 31, 2019 13:05 — forked from mariacha/custom_twig.info.yml
Custom Twig functions Drupal 8
name: Custom twig
type: module
description: Custom Twig functions
core: 8.x
package: Custom
@vuchkov
vuchkov / CommunityLinksQuery.php
Created February 8, 2019 13:24 — forked from JeffreyWay/CommunityLinksQuery.php
Consider Query Objects source.
<?php
namespace App\Queries;
use App\CommunityLink;
class CommunityLinksQuery
{
/**
* Fetch all relevant community links.
@vuchkov
vuchkov / integrating_wordpress_with_composer.md
Last active February 11, 2019 20:49 — forked from CMCDragonkai/integrating_wordpress_with_composer.md
Integrating Wordpress with Composer #php #wordpress

Integrating Wordpress with Composer

Setup the project directory:

mkdir wordpress-composer
cd wordpress-composer