Skip to content

Instantly share code, notes, and snippets.

David López lopezator

Block or report user

Report or block lopezator

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lopezator
lopezator / PostgreSQL_index_naming.rst
Last active Nov 18, 2019 — forked from popravich/PostgreSQL_index_naming.rst
PostgreSQL index naming convention to remember
View PostgreSQL_index_naming.rst

The standard names for indexes in PostgreSQL are:

{tablename}_{columnname(s)}_{suffix}

where the suffix is one of the following:

  • pkey for a Primary Key constraint;
  • uq for a Unique constraint;
  • excl for an Exclusion constraint;
  • idx for any other kind of index;
View keybase.md

Keybase proof

I hereby claim:

  • I am lopezator on github.
  • I am lopezator (https://keybase.io/lopezator) on keybase.
  • I have a public key ASBknpL2bm1ODZFb1VELKQvdFwxtqW-9FY8bwWnPqz0qZAo

To claim this, I am signing this object:

@lopezator
lopezator / .tmux.conf
Created Apr 11, 2018
Tmux config, mouse integration
View .tmux.conf
# move this to ~/.tmux.conf and restart session to apply changes
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
View debug_wsod.php
<?php
// ----------------------------------------------------------------------------------------------------
// - Display Errors
// ----------------------------------------------------------------------------------------------------
ini_set('display_errors', 'On');
ini_set('html_errors', 0);
// ----------------------------------------------------------------------------------------------------
// - Error Reporting
View OpenVPN Debian 8.0 server.conf
#################################################
# Sample OpenVPN 2.0 config file for #
# multi-client server. #
# #
# This file is for the server side #
# of a many-clients <-> one-server #
# OpenVPN configuration. #
# #
# OpenVPN also supports #
# single-machine <-> single-machine #
View pickadate.js inline "theme"
IMPORTANT:
The below code will break plugin functionality except for the specific inline case, if you use it
in other places you will need to improve/change this code.
1.- Add the pickadate.js plugin as usual, using an input.
<input type="text" class="datepicker" />
2.- Set your pickadate.js to use the "classic" theme (load the corresponding classic theme files).
3.- Load the plugin like this (in document.ready or whatever):
You can’t perform that action at this time.