Skip to content

Instantly share code, notes, and snippets.

View onmax's full-sized avatar
💭
🌍

Max onmax

💭
🌍
View GitHub Profile
@onmax
onmax / tailwind-only-tooltip.html
Created March 18, 2022 21:18
Tooltip with only Tailwind
<!-- See https://play.tailwindcss.com/PGizn94M2s -->
<div class="min-h-screen bg-gray-50 py-6 flex flex-col justify-center relative overflow-hidden sm:py-12">
<div class="absolute inset-0 bg-[url(/img/grid.svg)] bg-center [mask-image:linear-gradient(180deg,white,rgba(255,255,255,0))]"></div>
<div class="relative px-6 pt-10 pb-8 bg-white shadow-xl ring-1 ring-gray-900/5 sm:max-w-5xl sm:mx-auto sm:rounded-lg sm:px-10">
<div class="max-w-4xl mx-auto">
<div class="divide-y divide-gray-300/50">
<div class="py-8 text-base leading-7 text-gray-600">
<p>
An amazing Tooltip
<span class="group hover:underline cursor-pointer inline-block relative">
@onmax
onmax / event-list.js
Last active February 8, 2022 19:42
List all active events in a page
// More info at:
// https://www.perimeterx.com/tech-blog/2019/list-every-event-that-exists-in-the-browser/
// Just run it in developer console:
function _isEvent(prop) {
if (0 !== prop.indexOf("on")) {
return false;
}
return true;
}
@onmax
onmax / README.md
Created November 25, 2021 12:50
Alastria Remix

Connect quickly to Alastria network and run SC functions

  1. Go to remix (Without https!)
  2. Go to "Deploy & run transactions" (third icon on the left bar)
  3. Select the "Web3 Provider" and use this node: http://63.33.206.111/rpc
  4. Go to the plugin manager (fourth icon) and add "DGIT"
  5. A new git icon on the left bar has appeared, click it
  6. Open Github tab and look for the clone
  7. Paste this repository: https://github.com/alastria/alastriaID-truffle-contracts (you can select the branch)
  8. If you go to File explorer you will find the contracts there.
@onmax
onmax / README.md
Created November 15, 2021 12:54
Quick example how to work with RxJS as a Pipe of messages

Quick example how to work with RxJS as a Pipe of messages

See it in work

@onmax
onmax / private-key.ts
Last active November 15, 2021 09:28
Get private key as string from keystore
const keythereum = require('keythereum')
const keystore = require("path/to/keystore.json")
const password = "PASSWORD"
const privateKey: string = keythereum.recover(
password,
keystore
)
@onmax
onmax / README.md
Created November 14, 2021 13:12
Quick calendar with tailwindcss
@onmax
onmax / contracts.sh
Last active July 19, 2021 09:26
This gist allows you to deploy alastria contracts in a local node using geth and truffle
# cloning repo
git clone https://github.com/alastria/alastriaID-truffle-contracts
cd alastriaID-truffle-contracts
git checkout develop
npm install
npm run migrateLocal
npm run initLocal
docker rmi -f $(docker images -f "dangling=true" -q)
@onmax
onmax / install-gradle.sh
Created April 15, 2021 07:15
Installs gradle using the command line
# from https://linuxize.com/post/how-to-install-gradle-on-ubuntu-20-04/
sudo apt update
# Make sure to have java
# sudo apt install openjdk-11-jdk
# java -version
VERSION=6.5.1
wget https://services.gradle.org/distributions/gradle-${VERSION}-bin.zip -P /tmp
sudo unzip -d /opt/gradle /tmp/gradle-${VERSION}-bin.zip
FROM alpine:3.11
# Install Instantclient Basic Light Oracle and Dependencies
RUN apk --no-cache add libaio libnsl libc6-compat curl && \
cd /tmp && \
curl -o instantclient-basiclite.zip https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip -SL && \
unzip instantclient-basiclite.zip && \
mv instantclient*/ /usr/lib/instantclient && \
rm instantclient-basiclite.zip && \
ln -s /usr/lib/instantclient/libclntsh.so.19.1 /usr/lib/libclntsh.so && \