This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134a135,188 | |
> /** | |
> * Create a new THREE.Vector3 instance and project it onto a random point | |
> * on a spiral (in the XY-plane) centered at `base` and with randomized radius. | |
> * | |
> * Spiral generated by rotating series of ellipses generated with the | |
> * specified skew in accordance with the density wave theory | |
> * | |
> * @param {THREE.Vector3} base | |
> * @param {Number} radius |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Read / write db related metadata to/from dia diagram | |
# | |
# Copyright (C) 2015-2016 - Red Hat Inc. | |
require 'zlib' | |
require 'nokogiri' | |
require 'optparse' | |
require 'active_record' | |
require 'active_support/core_ext/string' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# search for unmatched '{' / '}' pairs and '#ifndef' / '#endif' pairs | |
# assuming that any given file should have fully matched sets of both | |
Dir.glob("src/**/*\.[h,cpp]").each { |src| | |
c = File.read(src) | |
ob = c.count('{') | |
cb = c.count('}') | |
od = c.count('#ifndef') | |
cd = c.count('#endif') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Small script to retrieve a twitter account's followers | |
# and report on new followers and 'unfollows' | |
require 'twitter' | |
require_relative '../lib/wipple/config' | |
ACCOUNT = 'change_me' | |
AUTH = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Small drop-in webpage to display rippled server status. | |
To deploy download the following and place in the same web server directory as this file: | |
- https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.15.0/lodash.js | |
- https://github.com/ripple/ripple-lib/releases/download/1.0.0/ripple-1.0.0-min.js | |
- https://raw.githubusercontent.com/caldwell/renderjson/master/renderjson.js | |
Then change RIPPLED_URI below to the location of your rippled server. | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup rippled validator on CentOS with a letsencrypt certificate. | |
# Run all commands as sudo unless otherwise indicated. | |
# Replace <HOSTNAME> with you full server hostname (ex. syracloud.net). | |
# Replace <COMPACT_HOSTNAME> with your server hostname minus periods (ex. syracloudnet). | |
# Replace <USER> with your login username | |
# Set system hostname to <HOSTNAME> | |
vim /etc/hostname | |
# Update the system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Converts a Base64 XRP address to standard Base58 representation | |
// Compile with: | |
// g++ b64.cpp -lssl -lcrypto | |
#include <stdlib.h> | |
#include <utility> | |
#include <string> | |
#include <iostream> | |
#include <boost/optional.hpp> | |
#include <boost/container/small_vector.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/server/ruby/vendor/rugged-0.26.0/ext/rugged/rugged_blame.c b/app/server/ruby/vendor/rugged-0.26.0/ext/rugged/rugged_blame.c | |
index 91716301f..9acd33253 100644 | |
--- a/app/server/ruby/vendor/rugged-0.26.0/ext/rugged/rugged_blame.c | |
+++ b/app/server/ruby/vendor/rugged-0.26.0/ext/rugged/rugged_blame.c | |
@@ -188,6 +188,11 @@ static VALUE rb_git_blame_count(VALUE self) | |
return UINT2NUM(git_blame_get_hunk_count(blame)); | |
} | |
+static VALUE rugged_blame_enum_size(VALUE rb_blame, VALUE rb_args, VALUE rb_eobj) | |
+{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Determine XRP account entropy, takes in a list of XRP accounts and | |
# outputs distribution by length, character, positional character, | |
# substring, and case-insensitive substring | |
require 'workers' | |
# Add method to extract all String substrings of a given length | |
class String | |
def substrings(n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Work in progress: Ruby Script that parses rippled rocksdb node store and | |
# dumps out data types. | |
# | |
# Written by Dev Null Productions <devnullproductions@gmail.com> | |
# | |
# Many thanks for help received on XRPChat: | |
# https://www.xrpchat.com/topic/31118-question-pertaining-to-hashing-database-lookups/ | |
# | |
# Requires upstream build of rocksdb-ruby to incorporate recent changes. | |
# Also the 'bistro' and 'tty-cursor' rubygems (gem install these). |