Skip to content

Instantly share code, notes, and snippets.

View osedoe's full-sized avatar
🇮🇨

Ose Diaz-Gonzalez osedoe

🇮🇨
View GitHub Profile
@osedoe
osedoe / utils.ts
Last active November 14, 2019 15:32
Useful typescript functions
const getRandomObjectProperty = (object: object) => Object.keys(object)[Math.floor(Math.random() * Object.keys(object).length)];
const generateRandomHexColor = () => '#'+Math.floor(Math.random()*16777215).toString(16);
@osedoe
osedoe / git-commands.md
Last active August 8, 2019 08:05
Git Handy Commands

Git handy commands

  • Fix/rename last commit: git commit —ammend
  • Rename current branch: git branch -m <newName>
  • Watch for branches to remove: git branch | grep <partOfBranchesName>
  • CAUTION Remove all branches that have the passed argument: git branch | grep <partOfBranchesName> | xargs git branch -d
  • Revert commits (faulty ones). Use with caution, if you're not sure, go for git reset
git log
git revert 
@osedoe
osedoe / README-Template.md
Created December 20, 2018 10:34 — forked from PurpleBooth/README-Template.md
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

@osedoe
osedoe / gist:2a2e899a0997a9c4b46429ca3f1690f0
Created December 4, 2018 19:57
Kill a wildfly process
pgrep -d" " -f "wildfly" | xargs kill -9;
@osedoe
osedoe / mongo.md
Last active November 27, 2018 17:17
Docker mongo

MongoDB

-Lift a docker with mongo

docker run  -d
            -p 27017:27017
            -v ~/Desktop/mongo-data:/data/db
            mongo
@osedoe
osedoe / package.json
Last active November 24, 2018 14:35
Quokka config files for jsdom plugin
{
"name": "...",
"...": "...",
"devDependencies": {
"jsdom-quokka-plugin": "^1.0.13"
},
"...": "...",
"quokka": {
"plugins": [
"jsdom-quokka-plugin"
@osedoe
osedoe / package.json
Last active November 13, 2018 18:00
Basic TSLint config file
{
"scripts": [
"lint": "tslint -p tsconfig.json"
]
}
// Clear cache after changing info in .env or config/
php artisan config:cache
// Migrate tables
php artisan migrate
// Create a table
php artisan make:migration <table_name>
ssh -C <user>@<ip-address>
@osedoe
osedoe / package.json
Created October 17, 2018 21:53
Simple package.json
{
"devDependencies": {
"postcss-clean": "^1.1.0",
"postcss-easy-import": "^3.0.0",
"postcss-font-magician": "^2.2.1",
"postcss-mixins": "^6.2.0",
"postcss-preset-env": "^6.0.7",
"stylelint": "^9.6.0"
}
}