Skip to content

Instantly share code, notes, and snippets.

View zurdors's full-sized avatar

Gaspar Reyes Póndigo zurdors

View GitHub Profile
@bcdavasconcelos
bcdavasconcelos / San Ho Dark.css
Last active October 15, 2021 13:38
CSS style sheet for rendering Markdown in different apps (such as DEVONthink 3, nvUltra, MMD Composer) #CSS #Markdown
/* San Ho Dark - https://www.dropbox.com/s/pbd8ka36rflz71c/Captura%20de%20tela%202020-01-06%2020.59.31.png?dl=0 */
body {
font-family: "EB Garamond";
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100% margin: 0;
padding: 50px 2rem 2rem;
max-width: 800px;
}
@bcdavasconcelos
bcdavasconcelos / San Ho Light.css
Last active June 24, 2020 00:07
CSS style sheet for rendering Markdown in different apps (such as DEVONthink 3, nvUltra, MMD Composer) #CSS #Markdown
/* "Cormorant Garamond SemiBold" */
body {
font-family: "Alegreya";
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100% margin: 0;
padding: 50px 2rem 2rem;
width: auto;
/* max-width: 800px; */
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#block an IP range
iptables -I INPUT -m iprange --src-range <from>-<to> -j DROP
/* Add custom menu item and endpoint to WooCommerce My-Account page */
function my_custom_endpoints() {
add_rewrite_endpoint( 'refunds-returns', EP_ROOT | EP_PAGES );
}
add_action( 'init', 'my_custom_endpoints' );
// so you can use is_wc_endpoint_url( 'refunds-returns' )
add_filter( 'woocommerce_get_query_vars', 'my_custom_woocommerce_query_vars', 0 );
@FradSer
FradSer / iterm2_switch_automatic.md
Last active April 23, 2024 02:40
Switch iTerm2 color preset automatic base on macOS dark mode.

The latest beta (3.5) includes separate color settings for light & dark mode. Toggling dark mode automatically switches colors.

Vist iTerm2 homepage or use brew install iterm2-beta to download the beta. Thanks @stefanwascoding.


  1. Add switch_automatic.py to ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch with:
// jshint esversion:6
(function() {
var app = Application('OmniFocus'); //This assumes that OmniFocus is installed on MacOS
app.includeStandardAdditions = true;
var doc = app.defaultDocument;
var content = doc.documentWindows.at(0).content;
var selectedTree = content.selectedTrees();
var selectedLen = selectedTree.length;
@ivikramsahu
ivikramsahu / gist:e9a2137612872316d53c961fe0ed7062
Created August 17, 2018 10:49 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@youandhubris
youandhubris / AppleScript Mail Send.scpt
Last active December 19, 2023 18:58
AppleScript to send e-mail, using Apple's Mail, with multiple recipients, cc, bcc and attachments
tell application "Mail"
set theFrom to ""
set theTos to {}
set theCcs to {}
set theBccs to {}
set theSubject to ""
set theContent to ""
set theSignature to ""
@albionselimaj
albionselimaj / functions.php
Created February 10, 2018 11:55
WooCommerce registration custom fields
<?php
// Add new fields in the registration form
// @link https://www.cloudways.com/blog/add-woocommerce-registration-form-fields/
add_action( 'woocommerce_register_form_start', function() { ?>
<p class="form-row form-row-wide">
<label for="reg_billing_phone"><?php _e( 'Phone', 'woocommerce' ); ?></label>
<input type="text" class="input-text" name="billing_phone" id="reg_billing_phone" value="<?php esc_attr_e( $_POST['billing_phone'] ); ?>" />
</p>