Skip to content

Instantly share code, notes, and snippets.

View zurdors's full-sized avatar

Gaspar Reyes Póndigo zurdors

View GitHub Profile
@youandhubris
youandhubris / AppleScript Mail Send.scpt
Last active September 24, 2025 17:28
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>
@jmarreros
jmarreros / comments.php
Last active February 21, 2018 05:53
Modificar el formulario de comentarios de WordPress
<?php
//Filtro para modificar la estructura
//de los campos del formulario de comentarios
add_filter( 'comment_form_defaults', 'dcms_modify_fields_form' );
function dcms_modify_fields_form( $args ){
$commenter = wp_get_current_commenter();
@earljon
earljon / aws_route53_delete.sh
Created August 15, 2017 08:58
Delete a Route 53 Record Set in AWS CLI
#!/bin/sh
# NOTE:
# Make sure that the value of Name, Type, TTL are the same with your DNS Record Set
HOSTED_ZONE_ID=<YOUR_HOSTED_ZONE_ID>
RESOURCE_VALUE=<YOUR_DNS_RESOURCE_VALUE-ex:IP or dns>
DNS_NAME=<YOUR_DNS_NAME-ex: subdomain.domain.com>
RECORD_TYPE=<DNS_RECORD_TYPE-ex: A, CNAME>
TTL=<TTL_VALUE>
@giocomai
giocomai / udunits in Fedora.R
Created June 14, 2017 15:03
install udunits2 for R in Fedora
# sudo dnf install udunits2 udunits2-devel
install.packages("udunits2", configure.args = c(udunits2 = '--with-udunits2-include=/usr/include/udunits2'))
@max-mapper
max-mapper / bibtex.png
Last active November 19, 2025 13:01
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@deanishe
deanishe / tag.py
Created April 27, 2017 23:02
Tag, untag and filter by tag on macOS
#!/usr/bin/env python
# encoding: utf-8
# vim: ft=python
#
# tag.py
#
# Copyright (c) 2015 Dean Jackson <[email protected]>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
@manasthakur
manasthakur / plugins.md
Last active November 20, 2025 03:58
Managing plugins in Vim

Managing plugins in Vim: The basics

Let's say the plugin is at a GitHub URL https://github.com/manasthakur/foo. First get the plugin by either cloning it (git clone https://github.com/manasthakur.foo.git) or simply downloading it as a zip (from its GitHub page).

Adding a plugin in Vim is equivalent to adding the plugin's code properly into its runtimepath (includes the $HOME/.vim directory by default). For example, if the layout of a plugin foo is as follows:

foo/autoload/foo.vim
foo/plugin/foo.vim
@giannisp
giannisp / gist:b53a76047b07751ed3ade3c1db1d2c51
Created November 18, 2016 05:50
Upgrade PostgreSQL 9.5.5 to 9.6.1 using Homebrew (macOS)
After automatically updating Postgres to 9.6.1 via Homebrew, the pg_ctl start command didn't work.
The error was something like "database files are incompatible with server".
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.1 and latest 9.5.x installed, and keep 9.6.1 as default
brew unlink postgresql
brew install postgresql95
brew unlink postgresql95
brew link postgresql
@timpulver
timpulver / pandoc_watch.js
Created May 28, 2016 18:15
Watches a markdown-folder for changes and re-generates .icml (InCopy / Adobe InDesign CC) files on every change
var exec = require('child_process').exec;
var chokidar = require('chokidar');
/*
* Watches a folder for changes in markdown (*.md) files and compiles them to ICML (Adobe InDesign CC / InCopy format)
*
* Dependencies:
* - Install Pandoc: pandoc.org
* - Run "npm install chokidar"
*