Skip to content

Instantly share code, notes, and snippets.

View pak11273's full-sized avatar
💭
I may be slow to respond.

Isaac Pak pak11273

💭
I may be slow to respond.
View GitHub Profile
@pak11273
pak11273 / git-deployment.md
Created November 3, 2018 19:46 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@pak11273
pak11273 / gist:2ed637f53aa92c7faceba83adece3d62
Last active November 16, 2018 01:25
Docker setup & debugging
// Basic Setup
// Create a Dockerfile and .dockerignore in root directory
// Run any npm scripts required (ie. babel build scripts)
// Build the container (don't forget the period at the end)
docker build -t <username>/<app name> .
ie. docker build -t pak11273/example:1.0.0 .
// VIM
// When copy/pasting react code, turn off vim autoclose tags
:CloseTagDisableBuffer
:CloseTagEnableBuffer
// vim batch command
:cdo s/pattern/newpattern/g | update
// repeat a macro with visual mode
// when pulling sub directories from git clone
git pull --depth=1 origin master
# template ref: https://github.com/github/gitignore
# Custom
build/
.cache-loader/
cdn/
coverage
cypress
development
dist
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
@pak11273
pak11273 / gist:bbdcffb45dfcad77ef2c1916d216a6c7
Last active November 12, 2019 02:20
basic tsconfig.json
{
"compilerOptions": {
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"module": "commonjs",
"removeComments": true,
"sourceMap": true,
"target": "es5",
"outDir": "dist"
},
I. Delete local/temp files and folders
*) Press WINDOWS-R on the keyboard to bring up the Run window.
*) Type %TMP% and then click OK.
*) Delete the contents of the folder that opens up.
II. Delete windows update files manually (Windows 7 / 10)
*) Stop the Windows update service before we can clear the update cache. To do that, search for “Services” in the Start menu and open it. If you are using your system as a standard user, then open it as an administrator using the right-click menu.
*) Run as administrator Windows Services
*) Once the Services window has been opened, find the service “Windows Update,” right-click on it and then select the option “Stop.” This action stops the Windows update service
*) Stop Windows Update Service
Clone the repo: git clone https://github.com/antonioyon/chromium-vim.git
Switch branches to issue-716-fix-broken-hints
choco install make
Run npm install and then make.
Go to chrome://extensions in browser and select the "Load Unpacked Extension" button (may need developer mode enabled).
Navigate to the git cloned directory
copy/paste this config: let blacklists = ["*://192.168.68.8:8080","https://mail.google.com/*","*://mail.google.com/*","@https://mail.google.com/mail/*","https://codesandbox.io/*","https://learn.freecodecamp.org/*","https://codepen.io/*"]
Once all of this is done, go back to chrome://extensions and turn off developer mode
@pak11273
pak11273 / bashrc
Last active October 16, 2020 16:41
## DOCKER
# formatting container list
alias dockerps='docker ps --format="ID\t{{.ID}}\nNAME\t{{.Names}}\nIMAGE\t{{.Image}}\nPORTS\t{{.Ports}}\nCOMMAND\t{{.Command}}\nCREATED\t{{.CreatedAt}}\nSTATUS\t{{.Status}}\n"'
# formatting images list
alias dockerimages='docker images --format="ID\t{{.ID}}\nREPOSITORY\t{{.Repository}}\nTAG\t{{.Tag}}\nCREATED\t{{.CreatedAt}}\nSIZE\t{{.Size}}\n"'