Skip to content

Instantly share code, notes, and snippets.

View chanakaudaya's full-sized avatar
💭
Keep looking, don't settle

Chanaka Fernando chanakaudaya

💭
Keep looking, don't settle
View GitHub Profile
@chanakaudaya
chanakaudaya / chainingSeq.xml
Created March 30, 2023 13:11
Mediation policy to call a backend and enrich payload in the request flow in WSO2 APIM
<sequence xmlns="http://ws.apache.org/ns/synapse" name="chainingSeq">
<!-- reading the author ID-->
<property name="uri.var.id" expression="json-eval($.author}" />
<!-- copying the original payload to a variable-->
<enrich>
<source type="body" clone="true"/>
<target type="property" property="original_request"/>
</enrich>
<!-- Saving the URL postfix that is required when calling the backend -->
<property name="rest_postfix" expression="$axis2:REST_URL_POSTFIX"/>
@gaquino
gaquino / gist:87bdf0e6e852e445c0489379d3e9732a
Last active April 15, 2024 06:52
MacOS (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools))
If you are facing an error like that on new MacOS version.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
It means that you need to install XCode command line, open a Terminal and run this command:
$ xcode-select --install
Note:
If you want to download and install Command Line tools manually, it can be downloaded from: https://developer.apple.com/download/more/
@subfuzion
subfuzion / curl.md
Last active June 20, 2024 13:48
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@TylerFisher
TylerFisher / hosting-on-github.md
Last active June 21, 2024 09:19
Basic steps for hosting on Github

Hey there, apparently people are still using this Gist from 2013! It's out of date! Consult the Github docs.

Steps for Hosting a Website on GitHub

  1. Create a GitHub account on github.com.
  2. Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
  3. (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
  4. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
  5. Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level