Skip to content

Instantly share code, notes, and snippets.

View ryarturogi's full-sized avatar
💻
Working Remotely!

Ricardo Guillen I. ryarturogi

💻
Working Remotely!
View GitHub Profile
@Balastrong
Balastrong / .gitconfig
Last active January 28, 2024 13:42
Some handy git aliases
# These aliases have been collected and shown in the making of this video, explaining how to set up and use git alises
# Source: https://youtu.be/Uk4GnYoQx_I
[alias]
# Shortcuts
ch = checkout
br = branch
st = status
br = branch
cm = commit -m
@wmoralesdev
wmoralesdev / BST
Created January 31, 2022 17:45
BST Implementation in C++
#include <iostream>
using namespace std;
struct node {
int data;
node* left;
node* right;
node() {
left = NULL;
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active April 30, 2024 08:44
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@sidigi
sidigi / axios.js
Created July 10, 2019 14:20
Nuxt Refresh token request
export default function ({$axios, app}) {
$axios.onResponseError(error => {
const code = parseInt(error.response && error.response.status);
let originalRequest = error.config;
if ([401, 403].includes(code)) {
originalRequest.__isRetryRequest = true;
let refresh_token = app.$auth.getRefreshToken(app.$auth.$storage.state.strategy).replace('Bearer ', '');
@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active April 27, 2024 00:27
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@arvindpdmn
arvindpdmn / JS.Done.Right.md
Last active February 16, 2023 20:05
JavaScript Done Right! (Basics, Functions, Inheritance, Async)

JavaScript Done Right!
Devopedia, Sept 2018

0. Introduction

JavaScript is one of the top programming languages today. It can also be confusing for developers coming from C, Java or PHP backgrounds. Worse still are the numerous frameworks (such as Angular and React) that make it difficult to decide what to learn and how to use the language.

In this short talk/demo, we'll look at the best practices in JavaScript programming. We'll explain using simple examples. This is for beginners and intermediate JS programmers. You must be familiar with JS syntax. We'll not cover DOM access, jQuery, Node.js or JS frameworks.

The recommendations here assume that you use a transpiler such as Babel so that code can work on older browsers. Therefore we freely use syntax from recent ECMAScript standards.

@nickytonline
nickytonline / customizing-vs-code.md
Last active April 27, 2024 00:44
Customizing VS Code for Two Fonts.

Customizing VS Code

I followed the instructions in this blog post Multiple Fonts: Alternative to Operator Mono in VSCode, but did not see any changes made to VS Code. After digging a bit, I discovered that all the CSS class names had changed. They’re now e.g. .mtk13, .mtk16 { … }.

Gotchas

  • Ensure it’s a file URL e.g. { "vscode_custom_css.imports": [ "file:///Users/Brian/Desktop/vscode-style.css" ] }
  • If you move the location of your file and update your user settings with the new location, you will need to disable and enable custom CSS cmd+shift+p.
  • Also, anytime you change the style in your custom CSS file, you need to disable, then re-enable the extension.

For reference

@berndverst
berndverst / VSCodeUserSettings.json
Last active April 6, 2024 00:14
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",
@przbadu
przbadu / _vue-rails.md
Last active July 16, 2022 21:48
Vue js and Rails integration

Setup Rails and Vuejs

  1. Generate new rails app using --webpack flag
rails new myApp --webpack=vue

Note:

  1. You can use --webpack=angular for angular application and --webpack=react for react.
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active April 17, 2024 18:56
Vanilla JavaScript Quick Reference / Cheatsheet