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 November 14, 2024 08:28
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 November 13, 2024 12:46
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 / models-user.js
Last active March 19, 2021 08:10
Search users with fullname in MongoDB using Mongoosejs and Aggregation Framework in Node.js
var mongoose = require('mongoose');
var validate = require('mongoose-validator');
var Schema = mongoose.Schema;
var crypto = require('crypto');
var utilities = require('../services/utilities');
var userSchema = new Schema({
firstname: { type : String, trim : true },
lastname: { type : String, trim : true },
username: { type: String, required: true, unique: true, lowercase: true, trim : true, index : true },
@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