Skip to content

Instantly share code, notes, and snippets.

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

Paul Morel PaulMorel

🏠
Working from home
View GitHub Profile
@NateJacobs
NateJacobs / gist:1263835
Created October 5, 2011 07:08
Using get_posts to return an object of posts. Question asked here http://wordpress.org/support/topic/how-to-call-query_posts-from-functionsphp
<?php
/* This part goes in your functions.php */
/**
* Get Some Posts
*
* Use get_posts to get an array of posts matching a set of criteria.
* The category_name is passed to the function.
* get_posts uses the same parameters as WP_query. See the Codex for the full details..
* http://codex.wordpress.org/Template_Tags/get_posts
@razwan
razwan / _baseline.scss
Created April 14, 2014 16:20
Aligning type to baseline the right way with SASS
$base-font-size: 16px;
$base-line-height: 1.5;
// this value may vary for each font
// unitless value relative to 1em
$cap-height: 0.68;
@mixin baseline($font-size, $scale: 2) {
//···············································
// Baseline
//···············································
// based on a gist by Razvan Onofrei: https://gist.github.com/razwan/10662500
// see https://gist.github.com/jeromev/11301969
//
// Example:
//
// body {
// font-size: $base-font-size;
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active January 16, 2024 01:17
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
anonymous
anonymous / config.json
Created January 15, 2015 21:21
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#383a5f",
"@brand-success": "#5cb85c",
@reima
reima / ButtonMod.cs
Last active September 2, 2022 06:44
using ColossalFramework.UI;
using ICities;
using UnityEngine;
namespace ButtonMod
{
public class ButtonMod : IUserMod
{
public string Name { get { return "Button"; } }
public string Description { get { return "Shows a button"; } }
@jordienr
jordienr / Gradient.js
Created September 12, 2021 00:23
Stripe Mesh Gradient WebGL
/*
* Stripe WebGl Gradient Animation
* All Credits to Stripe.com
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
* commented out for now.
* https://kevinhufnagl.com
*/