Skip to content

Instantly share code, notes, and snippets.

@PixieStudio
PixieStudio / README.md
Last active September 28, 2021 20:39
Rails API + React Server Deployment [Capistrano | Nginx | Passenger]

Rails API + React Server Deployment [Capistrano | Nginx | Passenger]

Prerequisites

OS : Ubuntu 18.04LTS

Initial Setup with deploy sudouser

Install rbenv-vars

@PixieStudio
PixieStudio / .gitconfig
Created December 19, 2020 16:28 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status
aa = add -A .
@PixieStudio
PixieStudio / README.md
Created November 17, 2020 13:59 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@PixieStudio
PixieStudio / README.md
Created November 12, 2020 13:00
VPS MIRO PLUGIN

VPS MIRO PLUGIN

Subdomain Server SSL

New App

#####################
## Server Machine ##
###################
@PixieStudio
PixieStudio / Capfile
Created October 6, 2020 10:05 — forked from mashihua/Capfile
Capistrano deploy script for node.js
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks
load 'config/node'
@PixieStudio
PixieStudio / handling_multiple_github_accounts.md
Created September 22, 2020 13:39 — forked from Jonalogy/handling_multiple_github_accounts.md
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

@PixieStudio
PixieStudio / user.js
Created June 10, 2020 23:05 — forked from EtienneR/user.js
XMLHttpRequest RESTful (GET, POST, PUT, DELETE)
// Get all users
var url = "http://localhost:8080/api/v1/users";
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.onload = function () {
var users = JSON.parse(xhr.responseText);
if (xhr.readyState == 4 && xhr.status == "200") {
console.table(users);
} else {
console.error(users);
@PixieStudio
PixieStudio / README.md
Created April 20, 2020 14:07
Problem with non-email account

REST API Users

Script

Get current user Id and find name

var myHeaders = new Headers();
    myHeaders.append("Authorization", "Bearer ACCESS_TOKEN_KEY");

    var requestOptions = {
        method: 'GET',
@PixieStudio
PixieStudio / prestashop.md
Last active September 25, 2019 19:52
Prestashop Template Classic Modif

Center Logo


theme/classic/assets/css/custom.css
#_desktop_logo {
  text-align: center;
}