Skip to content

Instantly share code, notes, and snippets.

View mikedotexe's full-sized avatar
🤙
hakuna matata

Mike Purvis mikedotexe

🤙
hakuna matata
View GitHub Profile
@KoryNunn
KoryNunn / handshake-airdrop.md
Last active March 12, 2024 07:03
Handshake airdrop for github users.

Had 15 github followers in 2019? You can get about $4kAUD of crypto for minimal effort.

Explain this scam

That's legitimately a good default position to hold, however, in this case, the free money is a function of time, and not only charity.

In February 2020, in order to promote Handshake (HNS) to developers, an airdrop was offered to any Github user with more than 15 followers. The Airdrop would give you 4246HNS, at the time worth around at $0.08USD per coin, for a total of $339.68USD, pretty generous!

Today, 4246HNS is worth around $4000 dollarydoos, and there are plenty of github users who haven't claimed theirs.

Review:

public key

updated w public key. I think this means that the deployer of the factory can call near deploy <wasm_blob> <address of any store created by the factory>

pub fn new() -> Self {
  assert!(!env::state_exists());
  let storage_price_per_byte = 10_000_000_000_000_000_000; // 10^19
  Self {
    ...
@webmaster128
webmaster128 / TOUR_COMSJS_STARGATE.md
Last active March 10, 2025 03:18
CosmJS + Stargate – A guided tour

Support for Cosmos SDK Stargate in CosmJS has been ongoing work for several months now. Stargate is released and CosmJS is here to connect to it.

Starting points

Let's explore what is new for Stargate support:

@mattlockyer
mattlockyer / random.rs
Last active June 2, 2022 17:40
NEAR Random Number (u128)
// anywhere in your contract
fn random_u128() -> u128 {
let random_seed = env::random_seed(); // len 32
// using first 16 bytes (doesn't affect randomness)
as_u128(random_seed.get(..16).unwrap())
}
fn as_u128(arr: &[u8]) -> u128 {
@kcole16
kcole16 / near-drop.md
Last active August 4, 2020 18:36
Funding a NEAR Drop

Funding a NEAR Drop

Follow these steps to fund a NEAR Drop for a user:

  1. Instantiate a near-api-js connection
const { connect, KeyPair } = require('nearlib');
const near = await connect({
        deps: { keyStore },
@kaustav-das
kaustav-das / XoRoRNG.cs
Last active December 6, 2020 09:13
xoroshiro128+ (named after its operations: XOR, rotate, shift, rotate) is a pseudorandom number generator intended as a successor to xorshift+. This is a direct C# port, mainly for Unity development, of the algorithm written by David Blackman and Sebastiano Vigna
/* Written in 2016 by David Blackman and Sebastiano Vigna ([email protected])
To the extent possible under law, the author has dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
See <http://creativecommons.org/publicdomain/zero/1.0/>. */
/**
* A port of Blackman and Vigna's xoroshiro128+ generator to C# for Unity Development.
* This is a direct rewrite from the JAVA implementation by SquidPony.
* <br>
@wesruv
wesruv / .lando.yml
Last active February 17, 2020 20:01
Lando config for a Drupal 7 site with Compass Sass
name: mydrupalprojectwithcompass
recipe: drupal7
config:
webroot: docroot
php: '5.6'
database: mysql:5.7
xdebug: true
events:
post-db-import:
- appserver: cd $LANDO_WEBROOT/sites/default && drush rr
@mortenson
mortenson / secpatch.sh
Last active January 17, 2019 18:46
Creates a patch of all security fixes (commits whose logs contain "SA-") between two Drupal tags
# This script attempts to create a patch file that includes all security fixes
# between two tags.
# Hypothetically, you could just apply the patch to your Drupal site after the
# script is finished successfully to be up to date.
# Biggest successful D7 patch - 7.36 => 7.58
# Biggest successful D8 patch - 8.4.0 => 8.4.7 / 8.6.0 => 8.6.7
# WARNING: This is an experimental patch generation method and may not be
# perfect. If you use this on production I take no responsibility for your
@ddedic
ddedic / Drupal 8 Links
Created March 22, 2018 13:47 — forked from PatrickTC/Drupal 8 Links
Drupal 8 stuff that's seemingly impossible to remember and FUN!
@NigelEarle
NigelEarle / Knex-Migrations-Seeding.md
Last active February 17, 2025 18:17
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables