Skip to content

Instantly share code, notes, and snippets.

View mrkpatchaa's full-sized avatar

Médédé Raymond KPATCHAA mrkpatchaa

View GitHub Profile
@mrkpatchaa
mrkpatchaa / dabblet.css
Created June 14, 2014 20:27 — forked from LeaVerou/dabblet.css
(C)Leanest CSS spinner ever
/**
* (C)Leanest CSS spinner ever
*/
@keyframes spin {
to { transform: rotate(1turn); }
}
.progress {
position: relative;
@mrkpatchaa
mrkpatchaa / slip_scrol_effect.css
Created October 25, 2014 21:41
How to Give Your Logo the “Slip Scroll” Effect
.container {
overflow: hidden;
position: relative;
min-height: 400px;
padding: 1em;
}
.dark {
background: #333;
}
//
// SmoothScroll for websites v1.2.1
// Licensed under the terms of the MIT license.
//
// You may use it in your theme if you credit me.
// It is also free to use on any individual website.
//
// Exception:
// The only restriction would be not to publish any
// extension for browsers or native application
var request = require("request"),
cheerio = require("cheerio"),
url = "https://www.google.com/search?q=data+mining",
corpus = {},
totalResults = 0,
resultsDownloaded = 0;
function callback () {
resultsDownloaded++;
<?php
namespace Acme\HelloBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\DependencyInjection\ContainerAware;
class MenuBuilder extends ContainerAware
{
public function mainMenu(FactoryInterface $factory, array $options)

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@mrkpatchaa
mrkpatchaa / language-cookie-wpse-113662.php
Created June 9, 2016 05:26 — forked from brasofilo/language-cookie-wpse-113662.php
WordPress plugin to deal with language cookies. Create one page for each language. Then a menu with them. Configure the arguments in the plugin file. Than do your thing in your theme with $_COOKIE[cookie_name].
@mrkpatchaa
mrkpatchaa / wp-deprecated-checker.sh
Last active August 26, 2016 19:53 — forked from jbuchbinder/wp-deprecated-checker.sh
WP deprecated function check
#!/bin/bash
#
# Wordpress Deprecated function checker
#
# Version: 0.2
#
# Author: Michiel Roos <michiel@donationbasedhosting.org>
# Jeff Buchbinder (https://github.com/jbuchbinder)
#
# www.php.net/manual/en/migration53.deprecated.php
@mrkpatchaa
mrkpatchaa / Apple dock recent files
Last active October 6, 2016 21:21
Apple dock : Display recent files, recent applications, favorites elements, ... Thanks to http://korben.info/ajoutez-acces-rapide-aux-dernieres-applications-derniers-documents-fermes-macos.html
defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = {"list-type" = 1; }; "tile-type" = "recents-tile";}' && \killall Dock
@mrkpatchaa
mrkpatchaa / get_ip_address_php
Created September 28, 2014 11:23
Get user ip address in php
<?PHP
function getUserIP()
{
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = $_SERVER['REMOTE_ADDR'];
if(filter_var($client, FILTER_VALIDATE_IP))
{