Skip to content

Instantly share code, notes, and snippets.

View romain130492's full-sized avatar

Rouiller Romain romain130492

View GitHub Profile
@romain130492
romain130492 / Programmatic-Navigation.md
Last active April 7, 2020 02:26
#vue Programmatic Navigation

Programmatic Navigation

To go back to the last page visited

this.$route(-1)

<a @click="$router.go(-1)">back</a>
@romain130492
romain130492 / selenium-python-scraping.md
Last active April 7, 2020 02:26
#Selenium #Python #Scraping - wait

Scraping with Selenium/ Python

Wait to get an element on the page

    driver = webdriver.Firefox(firefox_options=options,
 executable_path=geckodriver)
@romain130492
romain130492 / getOpenid-wechat-login.js
Last active March 4, 2024 01:49
Wechat : Login the user, get the openId, getUserInfo
/**
* We login the user to our mini-program
* We get the user Info (the user info don't contain the unionId)
* We make a request to our back-end to request the unionId.
* * For security reason wechat doesn't allow us to make that request on the front-end : https://api.weixin.qq.com/sns/jscode2session?appid=${process.env.APP_ID}&secret=${process.env.APP_SECRET}&js_code=${js_code}
* * To make that request we need(see at the bottom) : {secret,appId, js_code(login code)}
/** Client-Side **/
import http from '../utils/http.js'
@romain130492
romain130492 / Transaction-ethereum-smart-contract.js
Last active November 27, 2021 02:53
Transaction-ethereum-smart-contract
var Web3 = require("web3");
// TO make a transaction from a wallet address to a smart contract address
// The smart contract has a function called : `set()`, which set a value to the data for the variable called : `data`
const init2 = async () => {
try {
const provider = new Web3.providers.HttpProvider(endPoint); // https://ropsten.infura.io/v3/ROPSTEN_API_KEY
web3 = new Web3(provider);
web3.eth.handleRevert = true;
@romain130492
romain130492 / test.md
Created February 13, 2022 15:53
test test

When I started my web3 journey I got a freelance contract: Add web3 features to an existing app and reward the users with our token.

The point of rewarding the community was:

  • To motivate the community to do something to earn a token.
  • The brand wanted to have its own token to improve branding.
  • Rewarding the user with tokens is becoming more and more common these days.

Our users should get 5 tokens when completing their profile (bio, curriculum, social media links, etc.).