Skip to content

Instantly share code, notes, and snippets.

View felipelavinz's full-sized avatar

Felipe Lavín Z. felipelavinz

View GitHub Profile
@z3oc
z3oc / Firefox.MSEdge.smoothscroll
Created June 7, 2019 02:00
Firefox -> MS Edge flavor smooth scroll
general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS;250
general.smoothScroll.msdPhysics.enabled;true
general.smoothScroll.msdPhysics.motionBeginSpringConstant;450
general.smoothScroll.msdPhysics.regularSpringConstant;450
general.smoothScroll.msdPhysics.slowdownMinDeltaMS;50
INITIALISATION
==============
load wp-config.php
set up default constants
load wp-content/advanced-cache.php if it exists
load wp-content/db.php if it exists
connect to mysql, select db
load object cache (object-cache.php if it exists, or wp-include/cache.php if not)
load wp-content/sunrise.php if it exists (multisite only)
@kengoldfarb
kengoldfarb / livereload.conf
Created April 3, 2014 04:19
livereload nginx reverse proxy settings
location /livereload {
proxy_pass http://localhost:35729;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
@barbwiredmedia
barbwiredmedia / functions.php
Last active February 23, 2023 23:55
Wordpress SEO Yoast Order meta box. This will change the priority of Yoasts meta box and move it to the bottom of all pages / posts.
// Move Yoast Meta Box to bottom
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');
@0xqd
0xqd / wordpress_builtin.php
Created December 26, 2013 14:16
router.php for wordpress to work with php built in server best for development :D
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
chdir($root);
$path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/');
set_include_path(get_include_path().':'.__DIR__);
if(file_exists($root.$path))
{
if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/')
$path = rtrim($path,'/').'/index.php';
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@hugosolar
hugosolar / youtube_video.php
Last active December 14, 2015 15:58
Youtube video class for wordpress
<?php
/**
* Obtain youtube video API object and transients it
* eg. $video = new youtube_videos('simonscat');
* $video->get_videos(array('offset' => 5,'num_videos' => 10));
* @param $account string Account youtube name
* @return none
* @author Hugo Solar <contacto@hugosolar.net>
* */
@pwenzel
pwenzel / google-maps-oembed-wordpress.php
Created February 1, 2013 22:45
Faux Google Maps oEmbed for Wordpress
<?php
/* Faux Google Maps oEmbed
* Embed google maps in a nicer iframe without using their provided embed code
* @usage Paste a Google Maps link in your post and it will be replaced with an iframe when published
* @link http://bigsaturday.net/oembed-google-maps-wordpress/
*/
wp_embed_register_handler( 'google_map', '#https://maps\.google\.com/maps(.*)#i', 'embed_google_map' );
function embed_google_map( $matches ) {
$query = parse_url($matches[0]);
#!/bin/sh
#
# This hook does two things:
#
# 1. update the "info" files that allow the list of references to be
# queries over dumb transports such as http
#
# 2. if this repository looks like it is a non-bare repository, and
# the checked-out branch is pushed to, then update the working copy.
# This makes "push" function somewhat similarly to darcs and bzr.
@eddarmitage
eddarmitage / InstallingGitUsingYum.md
Created March 8, 2012 14:03
Installing git on CentOS 5 using yum

Installing git on CentOS 5 using yum

Since you're using CentOS 5, the default package manager is yum, not apt-get. To install a program using it, you'd normally use the following command:

$ sudo yum install <packagename>

However, when trying to install git this way, you'll encounter the following error on CentOS 5: