Skip to content

Instantly share code, notes, and snippets.

View nebolsin's full-sized avatar
🎯
Focusing

Sergey Nebolsin nebolsin

🎯
Focusing
View GitHub Profile
@nebolsin
nebolsin / SCVals.md
Created December 6, 2022 22:53 — forked from Smephite/SCVals.md
A Simple Guide to Soroban Types

A Simple Guide to Soroban Types

Note: The following content is a written version of the [XDR spec][xdr-spec]

As of [js-soroban-client v0.1.3][js-client] and [soroban-cli v0.2.1][soroban-tools] it's still really funny to work with custom types required for soroban so I will explain to the best of my knowledge how to build a custom Soroban Type in JSON format (but you should probably ask @tdep...)

Note: many of these types actually have helper functions and can be entered

@nebolsin
nebolsin / alias_matchers.md
Created March 11, 2021 20:36 — forked from JunichiIto/alias_matchers.md
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@nebolsin
nebolsin / sign_data.go
Created November 17, 2018 23:04 — forked from nikhilsaraf/sign_data.go
Stellar URI Scheme Request Generation and Signing
/*
Copyright 2018 Lightyear.io
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
Verifying my Blockstack ID is secured with the address 19js9z4AgChTwunomtMDgdJtrKqZ8Nda71 https://explorer.blockstack.org/address/19js9z4AgChTwunomtMDgdJtrKqZ8Nda71
@nebolsin
nebolsin / gist:52f0e8753e0cc3b141e9eff29bc66865
Created June 22, 2018 19:57
Blockstack ID Verification
Verifying my Blockstack ID is secured with the address 19js9z4AgChTwunomtMDgdJtrKqZ8Nda71 https://explorer.blockstack.org/address/19js9z4AgChTwunomtMDgdJtrKqZ8Nda71
@nebolsin
nebolsin / stellar-core-bug.cfg
Created February 5, 2018 07:14
Stellar Core unexpectedly resets DB
PEER_PORT=11635
HTTP_PORT=11636
DATABASE="postgresql://dbname=stellar-bug user=stellar"
LOG_FILE_PATH="/var/log/stellar/stellar-core-bug.log"
BUCKET_DIR_PATH="/var/lib/stellar/buckets-bug"
NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
KNOWN_PEERS=[
@nebolsin
nebolsin / btc
Created December 21, 2017 02:21 — forked from anonymous/btc
<script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
<style>
body {padding:0; margin:0}
.container {display:flex; flex-wrap: wrap;}
.child {flex-grow: 1; width:50%; height:33.3vh;}
</style>
<div class='container'>
<div class='child'>
<script type="text/javascript">
new TradingView.widget({
@nebolsin
nebolsin / keybase.md
Created June 11, 2017 06:00
keybase.md

Keybase proof

I hereby claim:

  • I am nebolsin on github.
  • I am nebolsin (https://keybase.io/nebolsin) on keybase.
  • I have a public key ASBSbCz-7MIr-VOFm56_B4-rbOVK0qlwG_Jrkt1FFJjUhwo

To claim this, I am signing this object:

@nebolsin
nebolsin / 00_README.md
Created April 10, 2016 19:11 — forked from dbalatero/00_README.md
This is an example of how I combine interaction/service classes with Wisper event broadcasting inside Rails.

This is an example of how I combine interaction/service classes with Wisper event broadcasting in Rails.

In this example, I show a UsersController#create API, a corresponding service object, and all the test code/listeners to make it all happen.

The outcome is:

  • Concepts in your system ("Signing up a user", "Creating an order") have a single entry point in your codebase, vs. making stupid raw ActiveRecord calls to object.save in dozens of places.
  • Since your concept has one entry point (the service class), you can easily grep for usage of it.
  • Stupid easy to attach listeners to the service class
  • All event listeners are very small and easily unit tested
@nebolsin
nebolsin / osx-for-hackers.sh
Created October 28, 2015 04:07 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/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'