Skip to content

Instantly share code, notes, and snippets.

View alex-y-su's full-sized avatar

Alex Su alex-y-su

  • Imversed
View GitHub Profile
var trackClickEvent = function () {
var eventCategory = this.getAttribute("data-event-category") || "unknown";
var eventLabel = this.getAttribute("data-event-label") || "";
gtag('event', eventCategory, { 'label' : eventLabel, 'debug_mode': true });
};
var elementsToTrack = document.getElementsByClassName("ga-event");
@alex-y-su
alex-y-su / Basic-ERC20.sol
Created August 22, 2022 14:52
Imversed basic ERC-20 contract for tests
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
Nov 30 22:03:36 INF indexed block height=203341 module=txindex
Nov 30 22:03:41 INF Timed out dur=4990.099619 height=203342 module=consensus round=0 step=1
Nov 30 22:03:41 INF received proposal module=consensus proposal={"Type":32,"block_id":{"hash":"91338A96967748711BADD8BC46CDDAD0A2142D4CB52EA8BA8B8FECCC8E89A949","parts":{"hash":"E219A1A1489DD97F813DF9746366F02556C73614E0054325A77E0203EB835B11","total":1}},"height":203342,"pol_round":-1,"round":0,"signature":"iBLwtBBE6abTuqh9p8G5aJbczdL07kDBfRBP80axodSB7l4fns1G+yNTSQgyhHD7sR8vLq/80wKoz8pM4OApCg==","timestamp":"2021-11-30T22:03:41.252340897Z"}
Nov 30 22:03:41 INF received complete proposal block hash=91338A96967748711BADD8BC46CDDAD0A2142D4CB52EA8BA8B8FECCC8E89A949 height=203342 module=consensus
Nov 30 22:03:41 INF finalizing commit of block hash=91338A96967748711BADD8BC46CDDAD0A2142D4CB52EA8BA8B8FECCC8E89A949 height=203342 module=consensus num_txs=0 root=451313E765A18C2F021C1EA03489FE969D8D0B40CFD41A4F0B875E894BC2E016
Nov 30 22:03:41 INF minted coins fr
{
"model": {
"id": "youtube:Ha3KfU4jDYw",
"url": "https://www.youtube.com/watch?v=Ha3KfU4jDYw",
"title": "LIVERPOOL SCORE FOUR IN 360°",
"previewUrl": "",
"previewDimensions": null,
"isNotSafe": false,
"type": "web",
"typeData": {
@alex-y-su
alex-y-su / dependencies.gradle
Created August 10, 2019 13:54
SM dependencies
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.core:core-ktx:1.0.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "androidx.work:work-runtime-ktx:2.0.1"
implementation "androidx.work:work-rxjava2:2.0.1"
platform :ios, '9.0'
def productions_pods
use_frameworks!
pod 'IGListKit', :git => 'https://github.com/drinkius/IGListKit.git', :tag => 'interactive-reordering'
pod 'Toaster', :git => 'https://github.com/drinkius/Toaster.git'
pod 'SwiftLint', '0.25.1'
pod 'FBSDKCoreKit', '4.33.0'
pod 'FBSDKLoginKit', '4.33.0'
//------------------------------------------------------------------------------------
//In android library
//------------------------------------------------------------------------------------
@Module
@ProxyModule
class LibraryModule(val hostInjector: Injector) {
@Provides
fun proxyComponent() : IComponent = hostInjector.getInstance<IComponent>()
}
@alex-y-su
alex-y-su / ExperimentalRewriter
Created November 5, 2014 13:27
Roslyn trims space after syntax node change
namespace RoslynFeatureDemo
using Xunit;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
internal class ExperimentalRewriter : CSharpSyntaxRewriter