Skip to content

Instantly share code, notes, and snippets.

View eliasfaical's full-sized avatar
🏠
Working from home

Elias Faiçal eliasfaical

🏠
Working from home
View GitHub Profile
@tinotriste
tinotriste / parent-slug-function.php
Last active January 28, 2021 20:29
Wordpress: Display a page parent's slug
<?php
// Display a page parent's slug
$post_data = get_post($post->post_parent);
$parent_slug = $post_data->post_name;
echo $parent_slug;
?>
@jameskoster
jameskoster / functions.php
Last active July 7, 2017 23:43
WooCommerce - dequeue css (2.1+)
// Remove each style one by one
add_filter( 'woocommerce_enqueue_styles', 'jk_dequeue_styles' );
function jk_dequeue_styles( $enqueue_styles ) {
unset( $enqueue_styles['woocommerce-general'] ); // Remove the gloss
unset( $enqueue_styles['woocommerce-layout'] ); // Remove the layout
unset( $enqueue_styles['woocommerce-smallscreen'] ); // Remove the smallscreen optimisation
return $enqueue_styles;
}
// Or just remove them all in one line
@marcoslhc
marcoslhc / .editorconfig
Created October 13, 2013 06:36
editorconfig for JS + HTML + CSS
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
@jcemer
jcemer / code.scss
Last active December 26, 2015 09:29
.section-title {
font-size: rem(28px);
color: $blue;
@include inverse-bottom-line(80%);
}
.collaborate-item:last-child {
@include left-line(90%);
padding-left: 10%;
}

.address-map {
@zenorocha
zenorocha / .hyper.js
Last active November 12, 2023 15:13 — forked from millermedeiros/osx_setup.md
Setup macOS Sierra (10.12)
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
@Shelob9
Shelob9 / 1-pods-loop-general-example.php
Last active April 14, 2023 12:23
Pods Looping Examples.
<?php
//set up pods::find parameters to limit to 5 items
$param = array(
'limit' => 5,
);
//create pods object
$pods = pods('pod_name', $params );
//check that total values (given limit) returned is greater than zero
if ( $pods->total() > 0 ) {
@thulioph
thulioph / mapa.js
Created December 27, 2013 22:32
código final e completo do mapa personalizado / Artigo: API Google Maps V3 - blog.thulioph.com
function initialize() {
// Exibir mapa;
var myLatlng = new google.maps.LatLng(-8.0631495, -34.87131120000004);
var mapOptions = {
zoom: 17,
center: myLatlng,
panControl: false,
// mapTypeId: google.maps.MapTypeId.ROADMAP
mapTypeControlOptions: {
@vitorbritto
vitorbritto / vim.md
Last active January 20, 2023 09:26
Vim Commands Cheat Sheet

Vim Commands Cheat Sheet

How to Exit

Command Description
:q[uit] Quit Vim. This fails when changes have been made.
:q[uit]! Quit without writing.
:cq[uit] Quit always, without writing.
@vitorbritto
vitorbritto / commands.md
Last active June 9, 2016 12:44
Unix References

Unix Commands

Environment Control

cd d                         Change to directory d
mkdir d                      Create new directory d
rmdir d                      Remove directory d
mv f1 [f2...] d              Move file f to directory d
mv d1 d2                     Rename directory d1 as d2

passwd Change password

@danilowm
danilowm / gist:bb6f216dd018ae68a803
Created May 13, 2014 13:16
web.config wordpress em hospedagem Windows
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>