Skip to content

Instantly share code, notes, and snippets.

View ArjunBEG's full-sized avatar

Arjun Beg ArjunBEG

View GitHub Profile
var UI = (function() {
// Common functions used for tweaking UI elements.
function UI() {
}
// Global instance.
var instance;
UI.prototype.resetState = function(noDevices) {
@ArjunBEG
ArjunBEG / cool1.md
Created September 3, 2021 14:39
cool profile readmes

Welcome to Jonah Lawrence's profile!

@ArjunBEG
ArjunBEG / how-to-convert-site-to-jekyll
Created September 3, 2021 14:51 — forked from bilardi/how-to-convert-site-to-jekyll
how to convert site to jekyll without install jekyll
# Convert an HTML site to Jekyll
When your site is already a static web site, is simple:
- you can download your site by https://github.com/bilardi/siteclone
- you can follow the guide on https://jekyllrb.com/tutorials/convert-site-to-jekyll/
## If you don't want to install jekyll on your client
I prefer to install only what is necessary on my client, so I use docker for everything else.
In this case, I add the docker-compose.yml file on the git repository and I use it with:
```
- [The Church-Turing Thesis: Story and Recent Progress](https://www.youtube.com/watch?v=QlYJz1B5XLU)
- [Self-Learning, Modern Computer Science Curriculum](https://functionalcs.github.io/curriculum/)
- [Learn CS in 5 months](https://github.com/llSourcell/Learn_Computer_Science_in_5_Months)
- [Making a computer Turing complete](https://www.youtube.com/watch?v=AqNDk_UJW4k)
- [What Is Abstraction in Computer Science](https://www.youtube.com/watch?v=_y-5nZAbgt4)
@ArjunBEG
ArjunBEG / web-servers.md
Created May 24, 2022 16:02 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ArjunBEG
ArjunBEG / postgres-cheatsheet.md
Created May 24, 2022 16:02 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@ArjunBEG
ArjunBEG / gh-pages-deploy.md
Created May 24, 2022 16:02 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@ArjunBEG
ArjunBEG / gitflow-breakdown.md
Created May 24, 2022 16:03 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@ArjunBEG
ArjunBEG / node_nginx_ssl.md
Created May 24, 2022 16:03 — forked from bradtraversy/node_nginx_ssl.md
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

Git Cheat Sheet

Visit my blog.

Commands

Getting Started

git init

or