Skip to content

Instantly share code, notes, and snippets.

View mskian's full-sized avatar
🦕
Focusing

Santhosh Veer mskian

🦕
Focusing
View GitHub Profile
@mskian
mskian / actions.yml
Created May 3, 2023 06:33 — forked from mcnaveen/actions.yml
On New Tag create, copy the source to the server, build and restart pm2 service
name: Deploy Next.js Site via SSH
on:
push:
tags:
- "*"
jobs:
deploy:
runs-on: ubuntu-latest

Testing the matrix.org client-server API

Matrix is:

an open standard for decentralised communication, providing simple HTTP APIs and open source reference implementations for securely distributing and persisting JSON over an open federation of servers.

It's pretty fantastic, if you think on the massive problem of fragmentation all across the web. They've created an easy to use API, and you can do a kludgy test using curl from the terminal (*nix, mac, win). See: http://matrix.org/docs/howtos/client-server.html

It's pretty straightforward to do a quick test. I have an account at https://matrix.org / https://vector.im, so I used that to get a token.

@mskian
mskian / n8n docker command.md
Created April 27, 2023 06:33 — forked from mcnaveen/n8n docker command.md
Docker Command to Run n8n on Docker Container with Static IP Address

Create Docker Network

docker network create --subnet=172.1.0.0/16 Network Name

Run Docker Container

docker run -d --net NETWORKNAME \
--ip STATICIP \
-it \
--name n8n \
@mskian
mskian / github_gpg_key.md
Created February 28, 2023 10:01 — forked from ankurk91/github_gpg_key.md
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@mskian
mskian / instructions.md
Created November 30, 2022 05:57 — forked from msramalho/instructions.md
How to get a Facebook long term (non-expiring) access token for a Page
@mskian
mskian / strava_cli.md
Created August 30, 2022 07:08 — forked from michaellihs/strava_cli.md
Upload tracks to Strava from the Command Line

Upload GPS Tracks to Strava from your Command Line

This short tutorial describes how to upload GPS tracks to Strava using your command line interface / shell. It requires no special tools or any 3rd party code.

1. Generate an API Key

Run the following steps with your user logged in to Strava in your browser!

Strava uses OAuth to authenticate against 3rd party applications. In order to authenticate to your Strava account from your command line, you first have to generate an API key. Therefore go to this page https://strava.github.io/api/v3/oauth/ and create a new API. The settings are as follows:

@mskian
mskian / load_dotenv.sh
Created August 30, 2022 06:29 — forked from CHANG-CHING-CHUNG/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@mskian
mskian / .htaccess
Created March 26, 2020 11:49 — forked from conormcafee/.htaccess
Jekyll .htaccess for Apache Server
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)/$ $1.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .*[^/]$ %{REQUEST_URI}/ [L,R=301]
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
@mskian
mskian / repo-reset.md
Created May 2, 2019 10:24 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@mskian
mskian / linebreak.md
Created January 3, 2019 05:25
Line breaks in markdown
Hello  (<-- two spaces)
World

Hello
World