Skip to content

Instantly share code, notes, and snippets.

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

Rodrigo Cebrián González rcebrian

🏠
Working from home
View GitHub Profile
@mohokh67
mohokh67 / timestamp-formatter.md
Created June 1, 2020 14:26
Get YYYY-MM-DD HH-MM-SS in JavaScript
const formatedTimestamp = ()=> {
  const d = new Date()
  const date = d.toISOString().split('T')[0];
  const time = d.toTimeString().split(' ')[0].replace(/:/g, '-');
  return `${date} ${time}`
}
@kekru
kekru / 01-IntelliJ-Multiple-Gradle-Projects.md
Last active September 22, 2023 14:28
IntelliJ Multiple Gradle Projects

Multiple Gradle projects in IntelliJ

This is how to open multiple gradle projects in a single IntelliJ window.

  • File -> New -> Project ... -> Empty Project
  • File -> Project Structure ... -> Modules -> Plus Sign -> Import Module
    • Choose your Module -> Import module from external model -> Gradle -> Next
    • Activate Checkbox: "Create separate module per source set"
    • Activate Radio: "Use gradle wrapper task configuration"
  • Finish
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 6, 2024 00:55
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@Ivlyth
Ivlyth / js-date-format.js
Last active March 28, 2024 10:54
format javascript date to format "YYYY-mm-dd HH:MM:SS"
var d = new Date();
d = new Date(d.getTime() - 3000000);
var date_format_str = d.getFullYear().toString()+"-"+((d.getMonth()+1).toString().length==2?(d.getMonth()+1).toString():"0"+(d.getMonth()+1).toString())+"-"+(d.getDate().toString().length==2?d.getDate().toString():"0"+d.getDate().toString())+" "+(d.getHours().toString().length==2?d.getHours().toString():"0"+d.getHours().toString())+":"+((parseInt(d.getMinutes()/5)*5).toString().length==2?(parseInt(d.getMinutes()/5)*5).toString():"0"+(parseInt(d.getMinutes()/5)*5).toString())+":00";
console.log(date_format_str);
//2015-03-31 13:35:00
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active April 11, 2024 04:45
A better markdown cheatsheet.
@mattupstate
mattupstate / app.py
Created March 15, 2012 19:08
Flask application configuration using an environment variable and YAML
os
from flask_extended import Flask
app = Flask(__name__)
app.config.from_yaml(os.join(app.root_path, 'config.yml'))