Skip to content

Instantly share code, notes, and snippets.

View john20xdoe's full-sized avatar
:shipit:

Lee Alexis john20xdoe

:shipit:
  • Philippines
View GitHub Profile
@john20xdoe
john20xdoe / S3-Static-Sites.md
Created May 19, 2021 05:18 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

Resources

@john20xdoe
john20xdoe / git_compression_commands.txt
Last active January 23, 2020 09:06
Git Repo Compression
$ git reflog expire --expire=1.minute refs/heads/master
$ git fsck --unreachable
$ git prune
$ git gc
Reference: http://www.newartisans.com/blog/2008/04/diving-into-git.html
Basically this removes all reflogs that are older than a minute for the master branch, finds and deletes any commits that aren’t being used, then does some general cleanup on the whole repository to further compress it. This could have had its own tip, but it’s probably better to illustrate a great use of the subject’s subcommands in your workflow.
-- http://gitready.com/intermediate/2009/02/09/reflog-your-safety-net.html
@john20xdoe
john20xdoe / scripts.psh
Last active August 4, 2019 02:54
Windows 10 script setups
# Make symbolic link for chocolatey default install
# cmd
mklink /D "C:\ProgramData\chocolatey" 'C:\ProgramData\chocolatey'
# powershell Admin
New-Item -ItemType SymbolicLink -Path "C:\ProgramData\chocolatey" -Target "D:\Bin\chocolatey"
### Keybase proof
I hereby claim:
* I am john20xdoe on github.
* I am arekkushisu (https://keybase.io/arekkushisu) on keybase.
* I have a public key ASCNBjvLqjSSqnZbsQAk7xphxLWUIzQVqWdoT9O_FzZodgo
To claim this, I am signing this object:
@john20xdoe
john20xdoe / cloudSettings
Last active July 21, 2023 01:03
VSCode public settings for Dev 1 team
{"lastUpload":"2020-04-21T01:22:44.724Z","extensionVersion":"v3.4.3"}
@john20xdoe
john20xdoe / readme.md
Last active March 14, 2019 02:22
Gitlab CE run command

ultrarangers/gitlab-ce:latest

  • Creates data volume in your user directory, in folder named 'gitlab'
  • URL: //localhost:10040
  • Container name: gitlab
sudo docker run --detach \
  --hostname gitlab.local \
 --publish 10040:80 --publish 10041:443 --publish 10042:22 \
@john20xdoe
john20xdoe / app-store-badge.svg
Created January 26, 2019 05:50
Play Store and App Store download icons
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@john20xdoe
john20xdoe / docker_commands.txt
Last active December 10, 2018 02:42
Docker and Git commands
# Remove all containers
docker stop $(docker ps -a -q)
# Option 1
docker rm $(docker ps -a -q)
#Option 2
docker rm -f -v $(sudo docker ps -a -q)
# Remove untagged containers only
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")
@john20xdoe
john20xdoe / bash
Created July 9, 2018 01:04
Remove all node_modules recursively using bash
# based on https://coderwall.com/p/guqrca/remove-all-node_module-folders-recursively
# Run this inside the parent folder containing your node projects.
# -prune lets the command not have to go into the children node_mdules.
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
@john20xdoe
john20xdoe / .bash_profile
Last active April 2, 2018 00:52
Mac OS bash profile for improving terminal and common needs
# MAC commands
# Alias commands for enable show.hide all files
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
# iTerm2
# Set CLICOLOR if you want Ansi Colors in iTerm2
export CLICOLOR=1
# Set colors to match iTerm2 Terminal Colors