Skip to content

Instantly share code, notes, and snippets.

View tvl83's full-sized avatar

Thomas Le tvl83

  • Reality Flux, LLC
  • Oklahoma City, OK
  • X @tvl83
View GitHub Profile
@dakom
dakom / terra.ts
Last active April 2, 2022 19:54
Terra helpers
import {AccAddress, Coins, Wallet, CreateTxOptions, MsgStoreCode, MsgInstantiateContract, MsgExecuteContract} from "@terra-money/terra.js";
import {TxResult} from '@terra-dev/wallet-types';
// frequency of polling a transaction to see if it's ready
export const DEFAULT_TRANSACTION_INFO_POLL_WAIT:number = 500; //500ms
// amount of time to wait before giving up on transaction finishing
export const DEFAULT_TRANSACTION_INFO_TIMEOUT:number = 1000 * 60 * 5; // 5 mins
// amount of time to wait after uploading, due to localterra weirdness
@rupeshtiwari
rupeshtiwari / build angular app with github actions.yml
Created March 30, 2021 19:13
build angular app with github actions.yml
name: Angular GitHub CI
on:
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
@blockpane
blockpane / devnet.md
Last active December 14, 2020 05:21
FIO Devnet

FIO devnet

  1. I recommend creating a seperate user account for this, only used for running a dev net.
  2. Must be on Ubuntu 18.04
  3. User will require sudo access for part of the install.

Get code

In the user's home directory clone the following four repositories, suggest using the Develop branch for each:

@omarbaruzzo
omarbaruzzo / gist:a86a65d890ed823013315ea2d3727c2d
Created June 28, 2018 13:21
GenesisCalculator - code to be included in chainparams.cpp to calculate the genesis block, nnonce, merkle root etc.
#include "arith_uint256.h"//Mod.
//----------------------------------------------------------------------------------------------------------
//Mod.
/*
// calcolo del Blocco Genesi
// Resettiamo il valore del blocco
consensus.hashGenesisBlock = uint256S("0x");
std::cout << std::string("Iniziamo a calcolare il blocco:\n");
if (true && (genesis.GetHash() != consensus.hashGenesisBlock)) {
@jingzhehu
jingzhehu / CMakeLists.txt
Created February 26, 2017 15:36
Clion meets bitcoin.
cmake_minimum_required(VERSION 3.3)
project(bitcoin)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_custom_target(build-bitcoin ALL
COMMAND ./autogen.sh
COMMAND ./configure
COMMAND $(MAKE) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@JeffreyWay
JeffreyWay / countries.php
Created July 23, 2015 17:01
Country Names + Codes
[
"United States" => "us",
"Afghanistan" => "af",
"Albania" => "al",
"Algeria" => "dz",
"American Samoa" => "as",
"Andorra" => "ad",
"Angola" => "ad",
"Anguilla" => "ai",
"Antarctica" => "aq",
@danvbe
danvbe / 1-Explanations.md
Last active April 21, 2023 15:39
A way to integrate FosUserBundle and HWIOAuthBundle

I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:

  • the registration as service of your custom FOSUBUserProvider (with the necessary parameters)
  • set the service for oauth_user_provider in the security.yml with your custom created service

Here are the steps:

  1. Routing. In routing.yml I have added all the routes for both bundles.
  2. Configuration. I have set the config.yml mostly as it is presented in the HWIOAuthBundle.
  3. Security. I have set the security.yml mostly as it is presented in the HWIOAuthBundle (though my routes are using /login pattern, not /connect). Also, the oauth_user_provider is set for my custom service.
@lennart
lennart / gist:3787187
Created September 26, 2012 10:16
Web Config for Symfony 2 in WebMatrix 2
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="TempRewriteToWeb" stopProcessing="false">
<match url="^(web/)?(.*)$" />
<action type="Rewrite" url="web/{R:2}" logRewrittenUrl="true" />
</rule>