Skip to content

Instantly share code, notes, and snippets.

View ArtSabintsev's full-sized avatar
😎
Having fun!

Arthur Ariel Sabintsev ArtSabintsev

😎
Having fun!
View GitHub Profile
import { Pocket, HttpRpcProvider, RpcError, JailedStatus, StakingStatus } from '@pokt-network/pocket-js';
import axios, { AxiosResponse } from 'axios';
const DISPATCH_URL = new URL("https://mainnet-1.nodes.pokt.network:4201")
const POCKET_RPC_URL = new URL("https://mainnet-1.nodes.pokt.network:4201")
async function main() {
const pocket = new Pocket([DISPATCH_URL], new HttpRpcProvider(POCKET_RPC_URL))
const queryNodesResponse = await pocket?.rpc()?.query.getNodes(StakingStatus.Staked, JailedStatus.NA, 74060n, "", 1, 30000, 60000, true)
#import <Foundation/Foundation.h>
#import <assert.h>
//Compile with `clang -Os -framework Foundation -fno-objc-arc inlinestorage.m -o inline, run with `inline clever` or `inline naive`
/*
NaiveArray implements a simple immutable NSArray-like interface in probably the most obvious way: store a pointer to a C array of objects
*/
@interface NaiveArray : NSObject {
NSUInteger count;
@wesleybliss
wesleybliss / tools-i-use.md
Created April 1, 2017 22:50
Tools and things I use, for reference.

Tools I Use

These are my tools. There are many like them, but these ones are mine. Without me, my tools are useless. Without my tools, I am useless.

Project Management

Target Process
https://www.targetprocess.com/

@robertpainsi
robertpainsi / README.md
Last active November 13, 2024 08:04
How to reopen a pull-request after a force-push?

How to reopen a pull-request after a force-push?

Precodinitions

  • You need the rights to reopen pull requests on the repository.
  • The pull request hasn't been merged, just closed.

Instructions

  1. Write down the current commit hash of your PR-branch git log --oneline -1 <PR-BRANCH>
  2. Write down the latest commit hash on github before the PR has been closed.
  3. git push -f origin :
@chadmoone
chadmoone / recs.md
Last active June 20, 2016 17:52
Chad's 2016 WWDC Reccomendations

Chad's 2016 WWDC Talk Reccomendations

(Loosely in order of importance/value)

@vidugloeck
vidugloeck / wwdc16_session_notes_template
Created June 14, 2016 14:00
WWDC 16 Session Note template
# WWDC 2016 Session notes
This documents contains a complete list of all iOS related WWDC 16 sessions.
Please use this template to add your entries:
```
__Brief Description__:
__Link to Notes__: <If applicable: Please add your notes in a seperate file in this folder (e.g. 402_what's_new_in_swift.md) and link it from here>
__Watched by:__ <atYourName, atAnotherName>
@soffes
soffes / WebCredential.swift
Last active November 25, 2022 08:24
Easily access Shared Web Credentials
import Foundation
import Security
struct SharedWebCredentials {
// MARK: - Types
struct Credential {
let domain: String
let account: String
@mwaterfall
mwaterfall / StringExtensionHTML.swift
Last active May 27, 2024 04:36
Decoding HTML Entities in Swift
// Very slightly adapted from http://stackoverflow.com/a/30141700/106244
// 99.99% Credit to Martin R!
// Mapping from XML/HTML character entity reference to character
// From http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
private let characterEntities : [String: Character] = [
// XML predefined entities:
"&quot;" : "\"",
"&amp;" : "&",
// AFNetworking
[[AFHTTPSessionManager manager] GET:@"http://httpbin.org/ip" parameters:nil success:^(NSURLSessionDataTask *task, id JSON) {
NSLog(@"IP Address: %@", JSON[@"origin"]);
} failure:^(NSURLSessionDataTask *task, NSError *error) {
NSLog(@"Error: %@", error);
}];
// NSURLSession
NSURL *URL = [NSURL URLWithString:@"http://httpbin.org/ip"];
@venkatperi
venkatperi / CGContextExt.swift
Created April 24, 2015 20:54
CGContext Syntactic Sugar
// CGContextABCD(context!, ...) becomes context?.ABCD(...)
import Cocoa
extension CGContext {
func saveGState() { CGContextSaveGState(self) }
func restoreGState() { CGContextRestoreGState(self) }
func scaleCTM( sx: CGFloat, sy: CGFloat) { CGContextScaleCTM(self, sx, sy) }
func translateCTM( tx: CGFloat, ty: CGFloat) { CGContextTranslateCTM(self, tx, ty) }
func rotateCTM( angle: CGFloat) { CGContextRotateCTM(self, angle) }