Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Sergio Alexander Florez Galeano xergioalex

🎯
Focusing
View GitHub Profile
@xergioalex
xergioalex / main.py
Created May 16, 2019
Create lists of days between two days in python
View main.py
from datetime import datetime
from datetime import timedelta
start = '6/29/19'
end = '6/20/20'
start_date = datetime.strptime(start, '%m/%d/%y')
end_date = datetime.strptime(end, '%m/%d/%y')
days_total = (end_date - start_date).days
@xergioalex
xergioalex / Code with html
Last active Aug 20, 2018
Html markdown parser
View Code with html
module.exports = {
<details><summary>[mode](/concepts/mode): "production", // "production" | "development" | "none"</summary>
[mode](/concepts/mode): "production", // enable many optimizations for production builds
[mode](/concepts/mode): "development", // enabled useful tools for development
[mode](/concepts/mode): "none", // no defaults
</details>
// Chosen mode tells webpack to use its built-in optimizations accordingly.
<details><summary>[entry](/configuration/entry-context#entry): "./app/entry", // string | object | array</summary>
[entry](/configuration/entry-context#entry): ["./app/entry1", "./app/entry2"],
[entry](/configuration/entry-context#entry): {
@xergioalex
xergioalex / .block
Created Aug 11, 2018
D3 Force Simulation
View .block
license: mit
@xergioalex
xergioalex / .block
Created Aug 11, 2018
D3 Force Simulation
View .block
license: mit
@xergioalex
xergioalex / .block
Created Aug 11, 2018
D3 Force Simulation
View .block
license: mit
@xergioalex
xergioalex / .block
Created Aug 11, 2018
D3 Force Simulation
View .block
license: mit
@xergioalex
xergioalex / .block
Created Aug 11, 2018
D3 Force Simulation
View .block
license: mit
View .block
license: mit
View validationContact.js
/*
* Validation Function
*/
ValidationContactForm = {
clear: function () {
Validations.clear(['name', 'email', 'subject', 'message']);
Validations.clear(['contactFormSuccess'], true);
},
setError: function (inputError, message) {
return Session.set(inputError, message);
View getRandomNumbers.js
Utils = {
// Shuffle array
shuffle: function (o) {
for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
return o;
},
// Get random number in range
getRandomInt: function (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
},