Skip to content

Instantly share code, notes, and snippets.

View Swarag-N's full-sized avatar
👨‍🚀
Hello There!

Swarag Narayanasetty Swarag-N

👨‍🚀
Hello There!
View GitHub Profile
@cryptoleek-eth
cryptoleek-eth / starknet_dev_cheatsheet.md
Last active December 5, 2022 07:13
Starknet DEV ENV Cheat Sheet

install build tools

xcode-select --install

install brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_account","type":"address"}],"name":"unBlacklist","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"minter","type":"address"}],"name":"removeMinter"
@shivampip
shivampip / react_app_on_gh_pages.md
Last active July 9, 2020 11:39
Deploy React App on Github Pages

Deploy React App on Github Pages

  • My github username is shivampip, in below steps, replace it with yours
  • Say you have a react app named ghtest
  • Create new repo on github with same name as react app. i.e. ghtest
  • Now on local react app repo, install gh-pages module
npm install --save gh-pages
  • Now in package.json, add these line below name
@luismts
luismts / GitCommitBestPractices.md
Last active September 22, 2025 14:09
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@tomas302
tomas302 / README.md
Last active July 9, 2020 11:40
Quick GitHub Pages or Heroku deployment for ReactJS
@roylee0704
roylee0704 / dockergrep.sh
Created December 9, 2016 08:24
how to grep docker log
docker logs nginx 2>&1 | grep "127."
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container
@jdnichollsc
jdnichollsc / API REST de facturación
Last active July 21, 2020 11:30
Especialista en tecnologías Open Source sobre Microsoft Azure
* Billing REST API
Las operaciones se ajustan a la especificación del protocolo HTTP/1.1
Cada operación devuelve un encabezado x-ms-request-id
Azure Active Directory para la autenticación (El usuario debe ser miembro del rol propietario, colaborador o Lector)
Permiten consultar para las categorías:
- Uso de recursos
- RateCard de recursos (Obtener info de precios y metadatos de recursos de una suscripción de Azure)
@htp
htp / curl-websocket.sh
Last active September 8, 2025 02:19
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/
@jdnichollsc
jdnichollsc / MONGO_DB.md
Last active August 13, 2025 16:23
Search users with fullname in MongoDB using Mongoosejs and Aggregation Framework in Node.js

MongoDB’s Aggregation Framework

It processes documents through a pipeline of stages, where each stage transforms the documents before passing them to the next

The aggregation framework is MongoDB’s built-in way to do multi-document analysis like this — counting, grouping, transforming and filtering in one pipeline.

Aggregation Framework in MongoDB works very much like an RxJS pipeline, but for database documents. Pipeline stages are like RxJS operators, Documents flow through the pipeline like events through a stream and Each stage outputs a new transformed stream of documents to the next stage. In MongoDB’s Aggregation Framework, the stream is inside the database engine, so it’s usually much faster because it avoids network round-trips and leverages DB indexes.

@manifestinteractive
manifestinteractive / sniff.txt
Last active July 26, 2024 18:59
A friendly formatter for curl requests to help with debugging.
\n
============= HOST: ==========\n
\n
local_ip: %{local_ip}\n
local_port: %{local_port}\n
remote_ip: %{remote_ip}\n
remote_port: %{remote_port}\n
\n
======= CONNECTION: ==========\n
\n