Skip to content

Instantly share code, notes, and snippets.

View joseluis's full-sized avatar
💭
dreamin' n workin'

José Luis Cruz joseluis

💭
dreamin' n workin'
View GitHub Profile
anonymous
anonymous / gist:b04bfd0103e0558659fb
Created January 10, 2015 00:24
Countries
<wpcf-fields-select-option-australia>
<title>Australia</title>
<value>1</value>
</wpcf-fields-select-option-australia>
<wpcf-fields-select-option-canada>
<title>Canada</title>
<value>2</value>
</wpcf-fields-select-option-canada>
<wpcf-fields-select-option-france>
<title>France</title>
@purzlbaum
purzlbaum / style.sass
Created August 5, 2013 07:30
Attaches a external class to all links outside the domain. I got the code from: http://codegrad.hub.ph/marking-external-links-icon-wordpress/ and I extended it through line 14. The only thing you have to do: search a external link icon. You can find a good one on genericon.com.
/* external links
a.external
background: url('../images/external_link.png') no-repeat right 0px
@pulyaevskiy
pulyaevskiy / .travis.yml
Created April 10, 2016 17:30
Generate code coverage in TravisCI build and send it to Codecov
# Workaround which:
# * Starts observatory in background
# * Runs the test suite
# * Collects coverage and sends it to Codecov
#
# Someday the `test` package will support observatory and below steps
# could be simplified.
#
# Prerequisites:
# * Have Travis CI build for your repo
@FichteFoll
FichteFoll / semsel.md
Last active December 18, 2016 15:28
semantic version selectors for https://github.com/mojombo/semver/issues/205

Semantic Version Selectors

A semantic version selector (short: semsel) is a string that can match only onto specific semantic versions (semver). A semsel mainly consists of one or multiple comperators combined with inner logical ANDs and outer ORs.

A complete example could look like this:

>0.0.1-b.1337 <=0.0.2- || 0.0.3 +debug* || ~1.0 || 2.0.x +with* || 2.1.0- - 2.1.1- !2.1.1-b.9 || [3.1,3.3)
@amdrew
amdrew / gist:9313218
Last active April 14, 2017 19:39
Easy Digital Downloads - Show user's purchase history as dashboard widget
<?php
/**
* Register the dasboard widget
*/
function sumobi_edd_register_dashboard_widgets() {
wp_add_dashboard_widget( 'sumobi_edd_purchase_history', __( 'Purchase History', 'edd' ), 'sumbi_edd_purchase_history_widget' );
}
add_action( 'wp_dashboard_setup', 'sumobi_edd_register_dashboard_widgets' );
@kived
kived / animtest.py
Created March 24, 2016 17:35
Kivy: precision animation
import kivy
kivy.require('1.8.1')
from kivy.app import App
from kivy.lang import Builder
from kivy.clock import Clock
from kivy.utils import interpolate
from time import time
root = Builder.load_string('''
@plugnburn
plugnburn / soxharp.sh
Last active March 3, 2018 06:38
SoX harp - simplest cross-platform musical instrument in a few lines of Bash (depends on SoX)
#!/bin/bash
function idx() {
local t=${1%%$2*}
[[ "$1" == "$t" ]] && echo "-1" || echo ${#t}
}
oct=0
while IFS= read -r -s -n1 i; do

#Installing Taiga on CentOS 6 (x64)

##Dependencies ...

yum update -y
yum groupinstall "Development Tools" -y
yum install libxslt-devel libxml2-devel libXt-devel curl git tmux -y

##Installing PostgreSQL

@marklindhout
marklindhout / gist:2274861
Created April 1, 2012 11:45
Use xgettext to create default.pot from all PHP files in a directory (recursive), and place it in /languages/.
xgettext --from-code=utf-8 -k_e -k_x -k__ -o languages/default.pot $(find . -name "*.php")
@gregrickaby
gregrickaby / remove-all-woocommerce-scripts-styles.php
Last active January 2, 2019 10:38
Remove ALL WooCommerce scripts and styles.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php
/**
* Remove all WooCommerce scripts and styles! Forever!
*
* @author WP Smith
* @since 1.0.0
*/
function grd_remove_woocommerce_styles_scripts() {