Skip to content

Instantly share code, notes, and snippets.

View miguelzetina's full-sized avatar
🏠
Working from home

Miguel Angel Zetina Zetina miguelzetina

🏠
Working from home
View GitHub Profile
@miguelzetina
miguelzetina / iso_date.groovy
Created September 27, 2020 21:13 — forked from kdabir/iso_date.groovy
current date in iso 8601 in groovy
new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC"))
[192.168.33.20] out:
[192.168.33.20] out: ERRORS:
[192.168.33.20] out: django_messages.Message.recipient: (fields.E304) Reverse accessor for 'Message.recipient' clashes with reverse accessor for 'Message.recipient'.
[192.168.33.20] out: HINT: Add or change a related_name argument to the definition for 'Message.recipient' or 'Message.recipient'.
[192.168.33.20] out: django_messages.Message.recipient: (fields.E305) Reverse query name for 'Message.recipient' clashes with reverse query name for 'Message.recipient'.
[192.168.33.20] out: HINT: Add or change a related_name argument to the definition for 'Message.recipient' or 'Message.recipient'.
[192.168.33.20] out: django_messages.Message.sender: (fields.E304) Reverse accessor for 'Message.sender' clashes with reverse accessor for 'Message.sender'.
[192.168.33.20] out: HINT: Add or change a related_name argument to the definition for 'Message.sender' or 'Message.sender'.
[192.168.33.20] out: django_messages.Message.sender: (fields.E305) Reverse query name for '
[192.168.33.20] out: Creating table corsheaders_corsmodel
[192.168.33.20] out: Creating table django_summernote_attachment
[192.168.33.20] out: Creating table notifications_notification
[192.168.33.20] out: Creating table oembed_providerrule
[192.168.33.20] out: Creating table oembed_storedoembed
[192.168.33.20] out: Creating table postman_message
[192.168.33.20] out: Creating table messages_messagesent
[192.168.33.20] out: Creating table core_seccion
[192.168.33.20] out: Creating table core_reporteinapropiado
@miguelzetina
miguelzetina / set_envvar.md
Created December 14, 2019 01:17
Set environment variables from file

-o allexport enables all following variable definitions to be exported. +o allexport disables this feature.

set -o allexport
source conf-file
set +o allexport```
@miguelzetina
miguelzetina / solving_used_port_grails.md
Created December 2, 2019 23:18
Grails: Resolving “Server failed to start for port 8080: Address already in use.”
lsof -w -n -i tcp:8080
kill $PID
$("#form-password").submit((e)=>{
e.preventDefault();
$.ajax({
type: "POST",
url: "/api/parent/new-password",
data: JSON.stringify({token: $.url("?token"), password: $("#form-password input[name=password]").val()}),
contentType: "application/json",
success:function() {
location.replace('password-successful.html');
},
window.Parsley.addValidator('uppercase', {
requirementType: 'string',
validateString: function(value, requirement) {
var uppercases = value.match(/[A-Z]/g) || [];
return uppercases.length >= requirement;
},
messages: {
en: 'La contraseña debe tener al menos una letra mayúscula'
}
});
window.Parsley.addValidator('uppercase', {
requirementType: 'string',
validateString: function(value, requirement) {
var uppercases = value.match(/[A-Z]/g) || [];
return uppercases.length >= requirement;
},
messages: {
en: 'La contraseña debe tener al menos una letra mayúscula'
}
});
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],