Skip to content

Instantly share code, notes, and snippets.

View srttk's full-sized avatar
🏡
WFH

Sarath srttk

🏡
WFH
View GitHub Profile
@srttk
srttk / nodejs-cicd-github-actions.md
Created August 28, 2024 14:16 — forked from danielwetan/nodejs-cicd-github-actions.md
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to VPS folder

@srttk
srttk / client.js
Created February 23, 2023 09:04 — forked from mattfysh/client.js
urql + auth-exchange + aws-amplify
import { makeOperation } from '@urql/svelte'
import { authExchange } from '@urql/exchange-auth'
import { Auth } from 'aws-amplify'
import produce from 'immer'
import { set } from 'lodash'
const amplifyAuthExchange = authExchange({
addAuthToOperation: ({ authState, operation }) => {
if (!authState?.token) {
return operation
@srttk
srttk / example.png
Created September 20, 2022 06:50 — forked from charlesrt/example.png
Job Posting Standard
example.png
@srttk
srttk / download_egghead_videos.md
Created November 21, 2021 15:12 — forked from ldong/download_egghead_videos.md
download egghead videos

Download videos from egghead

Go to the egghead website, i.e. Building a React.js App

run

$.each($('h4 a'), function(index, video){
  console.log(video.href);
});
@srttk
srttk / LICENCE SUBLIME TEXT
Created February 23, 2019 17:26
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@srttk
srttk / LICENCE SUBLIME TEXT
Created February 23, 2019 17:26
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@srttk
srttk / Twitter API with Curl
Created February 13, 2018 10:06 — forked from apolloclark/Twitter API with Curl
Twitter API with Curl
# create an account, create an app
# @see https://apps.twitter.com/
# retrieve the access tokens
# @see https://dev.twitter.com/oauth/reference/post/oauth2/token
# create the file ~/twitter_api
nano ~/twitter_api
Authorization: OAuth oauth_consumer_key="XXXXXX", oauth_nonce="11111111", oauth_signature="XXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1450728725", oauth_token="99999-XXXXXX", oauth_version="1.0"
@srttk
srttk / App.js
Created July 7, 2017 01:26 — forked from fdidron/App.js
React Router v4 Auth
//Usage
import React from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import Route from './AuthRoute';
import Login from './Login';
import Private from './Private';
export default () =>
<Router>
@srttk
srttk / function_invocation.js
Created April 3, 2017 13:05 — forked from myshov/function_invocation.js
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);