Skip to content

Instantly share code, notes, and snippets.

Avatar

pepebe pepebe

View GitHub Profile
@pepebe
pepebe / scroll.css
Last active Jan 27, 2020
CSS-Klasse per JavaScript hinzufügen, wenn sich ein Element im Viewport befindet
View scroll.css
.mein-element {
opacity: 0;
transition: opacity .5s ease-in-out;
}
.visible {
opacity: 1;
}
View example.html
<div class="mein-element"></div>
<div class="mein-element"></div>
<div class="mein-element"></div>
@pepebe
pepebe / curl-verbose.php
Created Jan 13, 2020 — forked from hubgit/curl-verbose.php
Verbose cURL in PHP
View curl-verbose.php
<?php
// Request URL
$url = 'http://www.google.com/';
// HTTP headers
$headers = array(
//'Content-Type: application/json',
//'Accept: application/json',
);
@pepebe
pepebe / MODX index.php
Created Jul 18, 2019 — forked from christianseel/MODX index.php
MODX index.php with XRouting integrated
View MODX index.php
<?php
/*
* This file is part of MODX Revolution.
*
* Copyright (c) MODX, LLC. All Rights Reserved.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@pepebe
pepebe / xpdo-where
Created Jul 18, 2019 — forked from davidpede/xpdo-where
pdoResources where examples
View xpdo-where
&where=`{ "template:IN" : [ 1,2,3 ] }
&where=`{ "template:NOT IN" : [ 1,2,3 ] }
&where=`[{"alias:LIKE":"foo%", "OR:alias:LIKE":"%bar"},{"OR:pagetitle:=":"foobar", "AND:description:=":"raboof"}]`
@pepebe
pepebe / syncpage.php
Created Jun 17, 2019 — forked from krismas/syncpage.php
A small MODX plugin to avoid refreshing - by default - the entire site cache when editing a resource
View syncpage.php
<?php
/*
* A small MODX plugin to avoid refreshing - by default - the entire site cache when editing a cached resource - (c) 2012 ackwa.fr
*
* @version : 1.0.0
* @see : https://gist.github.com/gists/3639503
* @name : syncpage.php
* @author : g.noel@ackwa.fr
*
* @event : OnDocFormSave, OnDocFormPrerender
@pepebe
pepebe / box-shadow.html
Created Feb 1, 2019 — forked from ocean90/box-shadow.html
CSS3 Box Shadow, only top/right/bottom/left and all
View box-shadow.html
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
View useful-vars.md
  • MODX_BASE_PATH -- path to the MODX root

  • MODX_CORE_PATH -- path the MODX core directory

  • MODX_ASSETS_PATH -- path to the MODX assets directory

  • MODX_MANAGER_PATH -- path to the MODX manager directory

  • MODX_CONNECTORS_PATH -- path to the connectors directory

  • MODX_PROCESSORS_PATH -- path to the processors directory

  • [[++core_path]]

  • [[++manager_path]]

  • [[++assets_url]]

@pepebe
pepebe / youtube-stuff.md
Last active Dec 10, 2018
youtube stuff
View youtube-stuff.md

!less tracking: //www.youtube-nocookie.com/embed/[[+value]]

!thumbnails

Each YouTube video has 4 generated images. They are predictably formatted as follows:

https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
@pepebe
pepebe / getFormSteps.php
Created Dec 5, 2018 — forked from jonleverrier/getFormSteps.snippet.php
getFormSteps for the MODX Formalicious form builder by Sterc. This utility snippet displays all the step titles for a given form ID.
View getFormSteps.php
<?php
/*
getFormSteps snippet
for the Formalicious form builder for MODX by Sterc
This utility snippet displays all the step titles for a given form ID
Put the snippet in the Formalcious steps tpl and call like this;
[[!getFormSteps? stepFormId=`[[!+form_id]]` &tpl=`myFormStepsTpl`]]
You can’t perform that action at this time.