Skip to content

Instantly share code, notes, and snippets.

:octocat:
👍🏻

Sergei Filippov sergeifilippov

:octocat:
👍🏻
Block or report user

Report or block sergeifilippov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sergeifilippov
sergeifilippov / how-twig-ternary-statements-work.twig
Created Mar 17, 2019
How Twig ternary statements work by John Dohm
View how-twig-ternary-statements-work.twig
{#
Ternary Statements: Ternaries evaluate the variable
based on whether it is truthful
#}
{{ foo ? 'yes' : 'no' }} {# Returns 'yes' or 'no' #}
{{ foo ?: 'no' }} {# Returns foo or 'no' #}
{{ foo ? 'yes' }} {# Returns 'yes' or nothing #}
{#
View keybase.md

Keybase proof

I hereby claim:

  • I am sergeifilippov on github.
  • I am sergeif (https://keybase.io/sergeif) on keybase.
  • I have a public key ASD6bHJ_yGmscA2Q74pLjfE4tKxzxPbPaGIFEB2HmhKjOgo

To claim this, I am signing this object:

View lockable_script_boilerplate.sh
#!/bin/bash
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Lockable script boilerplate
# If using on macOS, try https://github.com/discoteq/flock
### HEADER ###
@sergeifilippov
sergeifilippov / compile-nginx.sh
Last active Sep 1, 2017 — forked from tollmanz/compile-nginx.sh
Compile nginx from source with latest openssl, without-mail, modules: pagespeed, echo
View compile-nginx.sh
# Install dependencies
#
# Setup adjustable vars
NGX_MODULE_PATH=$HOME/source
NGX_VERSION=1.10.2
OPENSSL_VERSION=1.0.2j
NGX_MODULE_ECHO=0.60
NGX_MODULE_CACHEPURGE=2.3
NGX_MODULE_HEALTHCHECK=0.3.0
@sergeifilippov
sergeifilippov / M2 acl.xml
Created Jun 13, 2016 — forked from Vinai/M2 acl.xml
My current Magento 2 PHPStorm File Templates (Feb 2016)
View M2 acl.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
</resource>
</resources>
</acl>
</config>
View templating.md

Templating in EE vs. Craft

Lots of people have asked, so here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft.

Table of Contents

  1. Comments
  2. Conditionals
  3. Loops
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

View magento-code-snippets.md

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
View php-fpm-cli
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Mathias Leppich <mleppich@muhqu.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
View btsync
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsync
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Multi-user daemonized version of btsync.
You can’t perform that action at this time.