Skip to content

Instantly share code, notes, and snippets.

View jcunanan05's full-sized avatar

Jonathan Cunanan jcunanan05

View GitHub Profile
# enable git push ssh on multiple repos
# delete cached
ssh-add -D
#1. go to your ~/.ssh
#2. open your favorite local editor
@jcunanan05
jcunanan05 / rails_commands.sh
Created August 5, 2019 01:50
Rails commands that i forget / commonly use
# run rails on a docker container / virtual container
rails server -p $PORT -b 0.0.0.0
# bundle
bundle update
bundle install
@jcunanan05
jcunanan05 / reactIntlSample.js
Created August 23, 2019 01:42
react-intl sample code using messages for locale
import React, { useState } from "react";
import { IntlProvider, FormattedMessage } from "react-intl";
const messages = {
en: {
"app.hello": "Hello"
},
fr: {
"app.hello": "Bonjour"
}
@jcunanan05
jcunanan05 / ghostcms.gitignore
Created August 25, 2019 04:13
Gitignore for GhostCMS
# Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
const getUser = axios.get('url'); // promise lang talaga to pag console.log
const handleUserDetails = (userDetails) => {
console.log(userDetails);
// pagka react
this.setState({ user: userDetails });
};
getUser
@jcunanan05
jcunanan05 / windows_git_bash_setup_ssh_config.md
Last active January 19, 2020 03:01
My notes on how to setup a ssh connection to a VPS in windows

Requirements

  • Git Bash
  • VPS to put the generated private key

Generate SSH key on your machine

  1. Open your git bash
  2. cd /c/Program Files/Git/etc/ssh
  3. run ssh-keygen, name your key (id_rsa is default) then enter enter..
@jcunanan05
jcunanan05 / .block
Last active April 12, 2020 19:37
fresh block bar graph
license: mit

link to github comments

sass/node-sass#1276 (comment)

I also found helpful this comment. After installing Python 2.7 and Visual C++ Build Tools I deleted node_modules folder, opened CMD from Administrator and ran npm install --msvs_version=2015. Aaand it installed successfully!

This link helped me to install Python and VS C++ build tools.

docs on how to install it

@jcunanan05
jcunanan05 / .block
Last active April 19, 2020 04:02
making an axis
license: mit
@jcunanan05
jcunanan05 / mac_fresh_install.sh
Last active April 5, 2021 01:52
Apple fresh install commands
# prevent photos app from launching, just change to NO if you change your mind
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES
# show hidden files, if you want to hide it, just set to false.
defaults write com.apple.Finder AppleShowAllFiles true
# install xcode command line tools
# https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_macOS_10.13_for_Xcode_10.1/Command_Line_Tools_macOS_10.13_for_Xcode_10.1.dmg
# install homebrew