Skip to content

Instantly share code, notes, and snippets.

View osedoe's full-sized avatar
🇮🇨

Ose Diaz-Gonzalez osedoe

🇮🇨
View GitHub Profile
@osedoe
osedoe / var-vs-let.js
Last active September 27, 2018 21:21
Difference in scope between 'let' and 'var'.
// Var: global or function level scope
// Let: block level scope
var one = 1;
let two = 2;
if( one === 1 ){
var one = 10;
let two = 20;
console.log(one); // 10
console.log(two); // 20
}
@osedoe
osedoe / gist:c5027aa72e092d242eb137005d76929f
Last active September 28, 2018 20:32
Remove Icon* files created by Google Drive on MacOS through Terminal
// Go-to parent folder and be careful with the command. It will delete all files starting with Icon...
find . -name 'Icon*' -type f -delete
@osedoe
osedoe / .postcssrc
Created September 28, 2018 21:23
PostCSS config file
{
"plugins": {
"postcss-easy-import": {
"prefix": "_",
"extensions": [".pcss", ".css"]
},
"postcss-mixins": true,
"postcss-preset-env": {
"stage": 3,
"features": {
@osedoe
osedoe / gh-pages-deploy.md
Created October 11, 2018 07:43 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@osedoe
osedoe / gist:92f1137017133baa60ecb50d7a317c72
Last active October 21, 2018 22:03
Git - Delete a branch both locally and remotely
GIT WORFLOW
---
-Step 1:
=== # Option A - NEW PROJECT: # ===
# Initialize local repo
mkdir project1
cd project1
git init // In root folder !!
@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"
}
}
ssh -C <user>@<ip-address>
// 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>
@osedoe
osedoe / package.json
Last active November 13, 2018 18:00
Basic TSLint config file
{
"scripts": [
"lint": "tslint -p tsconfig.json"
]
}
@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"