Skip to content

Instantly share code, notes, and snippets.

View cristianp6's full-sized avatar

Cristian Pascottini cristianp6

View GitHub Profile
<?php
/*
Author: Sai Varun KN
This is a redis caching system for wordpress.
some caching mechanics are summarized below:
- cached pages do not expire not unless explicitly deleted or reset
@toddsby
toddsby / backup.php
Last active December 30, 2021 06:01 — forked from menzerath/backup.php
backup.php
<?php
/*
* PHP: Recursively Backup Files & Folders to ZIP-File
* (c) 2012-2014: Marvin Menzerath - http://menzerath.eu
* contribution: Drew Toddsby
*/
// Make sure the script can handle large folders/files
ini_set('max_execution_time', 600);
ini_set('memory_limit','1024M');
@cristianp6
cristianp6 / SSHloginPasswordless.md
Last active October 26, 2016 08:41
SSH Passwordless auto login to remote host

Create authentication SSH-Kegen key on local/client host

cd ~ && ssh-keygen -t rsa

You could skip passphrase.

From host1, create .ssh directory on remote host via ssh

@cristianp6
cristianp6 / Fetch email in a file.md
Last active April 29, 2020 10:26
Write retrieved emails on a log file (Ubuntu/Debian)

Write retrieved emails in a file

As root, install fetchmail

$ apt-get install fetchmail

Check if fetchmail has SSL support: if you see something like "libssl.so.0" then yours has it

$ ldd /usr/bin/fetchmail
@addyosmani
addyosmani / README.md
Last active May 10, 2025 11:24 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@anildigital
anildigital / gist:862675ec1b7bccabc311
Created July 26, 2014 18:27
Remove dangling docker images
docker rmi $(docker images -q -f dangling=true)
@staltz
staltz / introrx.md
Last active May 15, 2025 10:37
The introduction to Reactive Programming you've been missing
@hdragomir
hdragomir / sm-annotated.html
Last active February 2, 2025 02:22
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@dhrrgn
dhrrgn / RedisSession.php
Last active February 15, 2022 19:54
PHP 5.4 Redis Session Handler
<?php
use Predis\Client;
class RedisSession implements SessionHandlerInterface {
private $redis;
private $keyPrefix;
private $maxLifetime;
/**