Skip to content

Instantly share code, notes, and snippets.

View zurdors's full-sized avatar

Gaspar Reyes Póndigo zurdors

View GitHub Profile
@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>
@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
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 <deanishe@deanishe.net>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
@manasthakur
manasthakur / plugins.md
Last active May 2, 2024 05:48
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"
*
@kshiteesh
kshiteesh / urlsafari
Last active March 8, 2024 22:11
This AppleScript saves all the tabs open in all Safari windows to a Markdown file.
(*
Export All Safari Tabs in All Open Windows to a Markdown File
July 13, 2015
// SCRIPT PAGE
http://hegde.me/urlsafari
// ORIGINAL SCRIPT ON WHICH THIS SCRIPT IS BUILT
http://veritrope.com/code/export-all-safari-tabs-to-a-text-file
@gbot
gbot / woocommerce-login-logout-redirects.php
Last active November 16, 2021 10:11
WP: Redirect to home page for WooCommerce login and logout. #ST3
/*----------------------------------------------------------------------------*/
// redirects for login / logout
/*----------------------------------------------------------------------------*/
add_filter('woocommerce_login_redirect', 'login_redirect');
function login_redirect($redirect_to) {
return home_url();
}
@ired
ired / Customized asana.php
Created September 19, 2014 21:01
Customized asana.php from Asana QuickTask Alfred Wokflow by Mannie Schumpert. Adding a description to the task is now possible. Ex: asana task::description.
<?php
/**
* QuickTask: The Alfred Workflow for Asana
*
* Author: Mannie Schumpert http://mannieschumpert.com
* Version: 2.1
*/
require('workflows.php');
class Asana {