Skip to content

Instantly share code, notes, and snippets.

View richardtorres314's full-sized avatar
🎯
Focusing

Richard Torres richardtorres314

🎯
Focusing
View GitHub Profile
Laravel 5 - Deploy to Heroku
Martin Cruz Otiniano
> composer create-project laravel/laravel my_name_app
> cd my_name_app
> git init
> git add -A
> git commit -m "Initial commit"
@richardtorres314
richardtorres314 / flexbox.scss
Last active October 12, 2024 17:02
CSS Flexbox - Sass Mixins
// --------------------------------------------------
// Flexbox SASS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
@mixin flexbox {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
@richardtorres314
richardtorres314 / GitCommitEmoji.md
Created January 16, 2018 16:50 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@richardtorres314
richardtorres314 / gist:3d426da2f0600159d937ac3c06ca40b3
Created January 7, 2020 18:32 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@richardtorres314
richardtorres314 / VSCodeUserSettings.json
Last active May 29, 2020 20:24 — forked from berndverst/VSCodeUserSettings.json
VS Code: Override Terminal Colors with Solarized Dark regardless of Theme
{
"workbench.colorCustomizations": {
"terminal.foreground": "#839496",
"terminal.background": "#002833",
"terminal.ansiBlack": "#003541",
"terminal.ansiBlue": "#268bd2",
"terminal.ansiCyan": "#2aa198",
"terminal.ansiGreen": "#859901",
"terminal.ansiMagenta": "#d33682",
"terminal.ansiRed": "#dc322f",
@richardtorres314
richardtorres314 / snsToSlack.js
Created June 11, 2020 15:07 — forked from terranware/snsToSlack.js
AWS Lambda function to Slack Channel hookup
var https = require('https');
var util = require('util');
exports.handler = function(event, context) {
console.log(JSON.stringify(event, null, 2));
console.log('From SNS:', event.Records[0].Sns.Message);
var postData = {
"channel": "#aws-sns",
"username": "AWS SNS via Lamda :: DevQa Cloud",

Firing up LaTex on macOS 🔥

As I'm writing this small tutorial, I assume you've read my previous one about setting up macOS, so if for any tool I'll use without explanation, look to that other article.

MacTex

The full version IS NOT MANDATORY, as in the tutorial that follows I installed the smaller version of MacTeX and proceded installing every needed dependency. Installing the complete package is about ~3.5GB of download and ~5GB on disk, the smaller one is just about 80MBs.

Click here to download the complete version or here to download the smaller version.

Gnuplot

@richardtorres314
richardtorres314 / LogitechF310_Macbook.MD
Created June 17, 2023 19:18 — forked from jackblk/LogitechF310_Macbook.MD
Getting Logitech F310 to work with Macbook USB-C port

Connect & use Logitech F310 with Macbook

Since my Macbook Pro only has USB-C port, I used an USB-A to USB-C adapter to connect my F310 to it, but it does not work (pressing MODE button does not turn on the LED).

How to

To make it work:

  • Disconnect F310 from Mac
  • On F310: switch X-input to D-input
  • Hold Logitech button (in the middle)
  • Connect F310 to Mac via adapter, now you can release the Logitech button.
@richardtorres314
richardtorres314 / git_rebase.md
Created January 25, 2024 17:55 — forked from ravibhure/git_rebase.md
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream