Skip to content

Instantly share code, notes, and snippets.

@ceap80
ceap80 / introrx.md
Created October 15, 2024 19:32 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@ceap80
ceap80 / debug-scroll.md
Created October 22, 2019 18:58 — forked from cuth/debug-scroll.md
Find the elements that are causing a horizontal scroll. Based on http://css-tricks.com/findingfixing-unintended-body-overflow/

Debug Horizontal Scroll

(function (d) {
    var w = d.documentElement.offsetWidth,
        t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT),
        b;
    while (t.nextNode()) {
        b = t.currentNode.getBoundingClientRect();
 if (b.right > w || b.left < 0) {
@ceap80
ceap80 / t5-wp-load-order.php
Created February 8, 2019 16:26 — forked from thefuxia/t5-wp-load-order.php
T5 WP Load Order
<?php
/**
* Plugin Name: T5 WP Load Order
* Description: Hooks into every action and creates a list of available variables, constants, functions, classes and files.
* Plugin URI:
* Version: 2012.11.05
* Author: Thomas Scholz
* Author URI: http://toscho.de
* Licence: MIT
* License URI: http://opensource.org/licenses/MIT
@ceap80
ceap80 / sf2_standalone_form.php
Created January 27, 2017 03:34 — forked from jubianchi/sf2_standalone_form.php
How to use Symfony2 Form Component Standalone
<?php
namespace Standalone\Form;
use \Symfony\Component\HttpFoundation as SHttp;
use \Symfony\Component\Form as SForm;
use \Symfony\Component\DependencyInjection as SDI;
use \Symfony\Bridge as SBridge;
//Register all your autoload function here
//...
@ceap80
ceap80 / criticalcss-bookmarklet-devtool-snippet.js
Created January 24, 2017 14:10 — forked from PaulKinlan/criticalcss-bookmarklet-devtool-snippet.js
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@ceap80
ceap80 / ExportChromePasswords.js
Last active December 6, 2016 01:37 — forked from cmatskas/ExportChromePasswords.js
ExportChromePasswords.js
var pm = PasswordManager.getInstance();
var pl = pm.savedPasswordsList_;
var model = pm.savedPasswordsList_.dataModel;
setTimeout(function(){
var item, url, user, pass
var decryptedRow = '"url","username","password"\n';
for (i=0; i < model.length; i++) {
PasswordManager.requestShowPassword(i);
item = pl.getListItemByIndex(i).childNodes[0];
@ceap80
ceap80 / DragTransform
Created October 10, 2015 22:46 — forked from fta2012/DragTransform
Slightly modified compiled coffeescript from this codepen: http://codepen.io/fta/pen/ifnqH. Paste into console on a page that has jQuery to load the two dependent libraries (jquery-ui and numericjs). Then call makeTransformable('#selector-name') to make that element WYSIWYG editable. Use inspector to get the CSS for the transforms.
var selector = 'img' // Replace this with the selector for the element you want to make transformable
jQuery.getScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', function() {
jQuery.getScript('//cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js', function() {
(function() {
var $, applyTransform, getTransform, makeTransformable;
$ = jQuery;
@ceap80
ceap80 / Chain.php
Last active August 29, 2015 14:07 — forked from rybakit/Chain.php
<?php
namespace Acme\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\Valid;
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
/**
* @Annotation
@ceap80
ceap80 / detector.js
Created March 7, 2014 17:09 — forked from mauricesvay/detector.js
De este gist se realizó el port de https://github.com/mauricesvay a php El port en php no soporta a la fecha múltiples rostros
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
@ceap80
ceap80 / 0_reuse_code.js
Created February 27, 2014 04:37
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console