Skip to content

Instantly share code, notes, and snippets.

View sfat's full-sized avatar
🚀

Andrei Sfat sfat

🚀
View GitHub Profile
@sfat
sfat / make_binance_order.sh
Created August 30, 2022 06:15
Make binance order to testnet binance
#!/usr/bin/env bash
timestamp=$(python3 -c 'import time; print(int(time.time() * 1000))')
api_key="API_KEY" # change me
secret_key="SECRET_KEY" # change me
query="symbol=$1&side=$2&type=MARKET&quantity=$3&recvWindow=10000&timestamp=$timestamp"
echo "$query"
signature=$(echo -n "$query" | openssl dgst -sha256 -hmac $secret_key)
#echo -n "$query"
echo "$signature"
Snyk CLI tool contributor agreement
This Snyk CLI tool Agreement (this "Agreement") applies to any Contribution you make to any Work.
This is a binding legal agreement on you and any organization you represent. If you are signing this Agreement on behalf of your employer or other organization, you represent and warrant that you have the authority to agree to this Agreement on behalf of the organization.
1. Definitions
"Contribution" means any original work, including any modification of or addition to an existing work, that you submit to Snyk CLI tool repo in any manner for inclusion in any Work.
"Snyk", "we" and "us" means Snyk Ltd.
public class ContentDuplicator {
public static void main(String[] args)
throws IOException, SAXException, ParserConfigurationException, TransformerException {
String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<note>\n"
+ " <content>\n"
+ " <ele> something </ele>\n"
+ " <tic> something else </tic>\n"
+ " </content>\n"
@sfat
sfat / keybase.md
Created October 3, 2018 19:27
Keybase sfat proof

Keybase proof

I hereby claim:

  • I am sfat on github.
  • I am sfat (https://keybase.io/sfat) on keybase.
  • I have a public key whose fingerprint is 3ED9 9F3E BB89 0589 707B 51D6 DC46 4BED 0E44 C0D6

To claim this, I am signing this object:

@sfat
sfat / HtmlParser.java
Last active July 18, 2018 10:32
Html Parser using Jsoup
public class HtmlParser {
public static void main(String[] args) throws IOException {
convertXML();
}
public static void convertXML() throws IOException {
String getUrl = "https://economictimes.indiatimes.com/motilal-oswal-long-term-equity-fund--direct-plan/mfportfolio/schemeid-29162.cms";
Document document = Jsoup.connect(getUrl).get();
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'