Skip to content

Instantly share code, notes, and snippets.

View pavittarx's full-sized avatar

Pavittar Singh pavittarx

View GitHub Profile
@pavittarx
pavittarx / gist:8e7ae4448ddb857756bc4307320f9f71
Created November 26, 2022 14:51 — forked from yano3/gist:1378948
git commit --amend --reset-author
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
@pavittarx
pavittarx / weather_data.csv
Created April 15, 2022 13:56
sample_data_csv
day city temperature windspeed event
1/1/2017 new york 32 6 Rain
1/2/2017 new york 36 7 Sunny
1/3/2017 new york 28 12 Snow
1/4/2017 new york 33 7 Sunny
1/1/2017 mumbai 90 5 Sunny
1/2/2017 mumbai 85 12 Fog
1/3/2017 mumbai 87 15 Fog
1/4/2017 mumbai 92 5 Rain
1/1/2017 paris 45 20 Sunny
[{
"name": "Stuart",
"hobbies": ["Running", "Walking", "Jumping"],
"friends": [{
"name": "Danny",
"date": "2021-10-05"
}, {
"name": "Ralph",
"date": "2021-10-02"
}, {
@pavittarx
pavittarx / verifyToken.md
Last active March 1, 2023 10:15
Urls to verify tokens on different social Media

Verify Linkedin Token

  https://api.linkedin.com/v2/me?oauth2_access_token=${token}

Verify Instagram Token

 https://graph.instagram.com/me?access_token=${token}
@pavittarx
pavittarx / README.md
Created October 8, 2020 14:07 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@pavittarx
pavittarx / main.dart
Created October 5, 2020 09:06
Flutter State
// View in DartPad: https://dartpad.dev/f19da3d75bda0e05d6e0f976864ec9b2
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
@pavittarx
pavittarx / cluster.md
Created August 8, 2019 10:45 — forked from learncodeacademy/cluster.md
Node Cluster - Enhance your node app by using all the cores of your processor.

Here's all you have to do to add clustering to your node.js application.

  • save this code as cluster.js, and run cluster.js instead of server.js (or /bin/www, or whatever it's called for your project)
  • the only line you'll need to change is the last line - it needs to point to the location of your server.js file
var cluster = require('cluster');

if (cluster.isMaster) {
  // Count the machine's CPUs
 var cpuCount = require('os').cpus().length;
@pavittarx
pavittarx / notes.md
Last active October 10, 2018 02:26
Links to Solid Resources

These are my personal finidings not backed up, they can be different from my understanding.

  1. databox.me has been depreceated in favor of solid.community. It was old data store for pods.
  2. soild-auth-client is for most part browser only. The user is authenticated in browser, no processing by the server takes place here. The server part is meant for users hosting their own servers.
  3. rdflib.js is browser only as well. The server implementation is aimed for users hosting their own pods.
  4. solid-cli is the command line utility to log in nodeJs, and make changes to your pods.
  5. WebID is just an HTTP URI that identifies an Agent.
    WebID-OIDC is an Authentication Protocol .
    WebID-TLS is an Authentication Protocol .\