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 / _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.
@riomyers
riomyers / clone_remote_branch.md
Created May 13, 2018 21:29 — forked from ff6347/clone_remote_branch.md
clone remote branch with git
@riomyers
riomyers / README.md
Created April 28, 2018 20:02 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ksO https://gist.github.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh