Skip to content

Instantly share code, notes, and snippets.

View riomyers's full-sized avatar
💭
Live in Code.

Rio Myers riomyers

💭
Live in Code.
View GitHub Profile
@riomyers
riomyers / WebhookTutorial.md
Created August 31, 2019 14:04 — forked from DerEnderKeks/WebhookTutorial.md
Simple Webhook Tutorial (Twitter -> Discord using IFTTT)

Navigate to: YouTube via IFTTT, Twitter via Zapier, Reddit or GitHub.

WARNING

If you get "Invalid Ingredient" errors, that means IFTTT updated the shit and you need to mess around with the "ingredients" they gave you now.

Simple Webhook Tutorial

In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel. Unlike jagrosh's tutorial, this one uses IFTTT. We all know that Zapier has a 100-request limit (Unless you are extremely rich and you even pay $20 a month or $220 a year) but IFTTT doesn't.

Interested in YouTube to Discord? Click [here](https://gist.github.com/aus

@riomyers
riomyers / cors.md
Created July 28, 2019 06:00 — forked from jesperorb/cors.md
Handle CORS Client-side

Handle CORS Client-side

Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.

Sources : MDN - HTTP Access Control | Wiki - CORS

CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost. This is primarily set by the header:

Access-Control-Allow-Origin
@riomyers
riomyers / Custom git remote names.md
Created July 24, 2019 16:09
customize git remote names

Keybase proof

I hereby claim:

  • I am riomyers on github.
  • I am jamesbong (https://keybase.io/jamesbong) on keybase.
  • I have a public key whose fingerprint is DAF2 72DE E802 EBE4 5A34 D06F 2729 CB1D B8A1 4327

To claim this, I am signing this object:

@riomyers
riomyers / _webserver.md
Created August 3, 2018 18:24 — forked from jgravois/_webserver.md
a simple guide for getting a local web server set up

Do I have a web server running?


having a web server turned on doesn't necessarily mean you are serving pages on the world wide web. its what allows you to load your own static files (.html, .js etc.) in a browser via http://.

if you're not sure whether or not you have a web server running, no problem! its easy to confirm.

what happens when you visit http://localhost/?

@riomyers
riomyers / README.md
Created June 25, 2018 19:33 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@riomyers
riomyers / gist:8c8fb10bccbdfeba4328bf2ee23a86f1
Created June 20, 2018 19:42 — forked from bt5e/gist:7507535
Markdown subscript and superscript

Testing subscript and superscript

Testing subscript subscript level 2

Testing superscript superscript level 2

@riomyers
riomyers / delete_git_submodule.md
Created June 11, 2018 17:57 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@riomyers
riomyers / git_submodules.md
Created June 8, 2018 23:40 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.

Git Commit Options

Basic Git Commit - (not recommended) opens text editor to add a message

git commit

Commit With Message

git commit -m 'commit message goes here'

Stage and Commit Changes in One Step

git commit -a -m 'commit message goes here'

Add Additional Changes and Modify Previous Commit Message

git commit --amend

Add Additional Changes and Don't Modify Previous Commit Message