Skip to content

Instantly share code, notes, and snippets.

@zxcmehran
zxcmehran / cache-extractor.php
Created December 4, 2020 05:15
Chrome/Firefox cache file extractor
<?php
/*
* Chrome/Firefox cache file extractor
* Just open cache entry page and copy/paste file data hex section
* into "cachefile.txt" file in script working directory and run me.
* You can run me through CLI or Webserver.
*
* Change $is_gzip to false if data is not gzip encoded.
*
* Chrome: chrome://cache
@lsv
lsv / README.md
Last active March 20, 2024 14:16
KNP Menu Bundle - Bootstrap 4 and Font Awesome 4
@JusteLeblanc
JusteLeblanc / materialize_form_theme.html.twig
Created February 27, 2017 21:09
Symfony2 form theme to integrate Materialize in your Symfony2 forms
{% extends 'form_div_layout.html.twig' %}
{% block form_row -%}
<div class="row{% if (not compound or force_error|default(false)) and not valid %} has-error{% endif %}">
<div class="input-field col s12">
{{- form_widget(form) -}}
{{- form_label(form) -}}
{{- form_errors(form) -}}
</div>
</div>
@fullpipe
fullpipe / sonata_admin_child_admin.md
Last active November 8, 2018 13:55
sonata admin child admin

from smlr

First, create your AAdmin, ABAdmin and BAdmin Classes like you would, if those Classes wouldn't share any relation. After this, add to your sonata.admin.A service a Child sonata.admin.AB (Admin.yml or Admin.xml).

Than you can use the configureSideMenu() method in AAdmin to create a sidemenu and generate a link to ABAdmin.

It's important to add $parentAssociationMapping to your ABAdmin Class and adding some if-statements to improve the usability, if list and form is in a A-context.

If you know the mechanism, it's quite easy. Hope my example works for you..

@tehbeard
tehbeard / gist:1292348
Created October 17, 2011 10:24
MC RCON (1.9pr4)
<?php
/*
RCON remote console class, modified for minecraft compability by Tehbeard.
!!!YOU MUST CONFIGURE RCON ON YOUR MINECRAFT SERVER FOR THIS TO WORK
AT TIME OF WRITING ONLY 1.9pr4+ HAVE BUILTIN RCON SUPPORT!!!
Example Code:
============
include_once("rcon.class.php"); //Include this file