Skip to content

Instantly share code, notes, and snippets.

View mihaiserban's full-sized avatar
💭
👨🏻‍💻✨

Mihai Serban mihaiserban

💭
👨🏻‍💻✨
View GitHub Profile
View med-9797f5f7b9b4_gesture-demo.tsx
import React, { useState } from "react";
import { SafeAreaView, Text } from "react-native";
import {
Gesture,
GestureDetector,
GestureHandlerRootView,
} from "react-native-gesture-handler";
export default function GestureDemo() {
const [tGestureStart, setTGestureStart] = useState<undefined | string>();
@mihaiserban
mihaiserban / index.ts
Created December 23, 2021 13:09 — forked from dtmrc/index.ts
get metadata from metaplex
View index.ts
import * as web3 from "@solana/web3.js";
import * as metadata from "./metadata"; // see metadata.ts
const tokenAddress = new web3.PublicKey(
"CxkKDaBvtHqg8aHBVY8E4YYBsCfJkJVsTAEdTo5k4SEw"
);
(async () => {
// Connect to cluster
var connection = new web3.Connection(
@mihaiserban
mihaiserban / snippets.js
Created December 7, 2021 10:28 — forked from beautyfree/snippets.js
Solana Web3 Snippets
View snippets.js
import {
Account,
clusterApiUrl,
Connection,
PublicKey,
sendAndConfirmTransaction,
SystemProgram,
Transaction,
} from '@solana/web3.js';
@mihaiserban
mihaiserban / mint.js
Created December 7, 2021 10:27 — forked from zurgl/mint.js
solana js examples
View mint.js
const web3 = require('@solana/web3.js');
const splToken = require('@solana/spl-token');
(async () => {
//create connection to devnet
const connection = new web3.Connection(web3.clusterApiUrl("devnet"));
//generate keypair and airdrop 1000000000 Lamports (1 SOL)
const myKeypair = web3.Keypair.generate();
@mihaiserban
mihaiserban / 00_README.md
Created November 29, 2021 19:36 — forked from LeZuse/00_README.md
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)
View 00_README.md

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms
View klipper commands
Calibrate probe
PROBE_CALIBRATE
TESTZ Z=-.1
ACCEPT
SAVE_CONFIG
SET_GCODE_OFFSET Z=+.010
@mihaiserban
mihaiserban / printer.cfg
Last active December 20, 2023 21:23
Klipper Ender 5 Plus stock printer config
View printer.cfg
# This file contains pin mappings for the Creality Ender 5 Plus.
# Ender 5 Plus stock uses a Creality v2.2 board, similar to CR-20 Pro.
# To use this config, the firmware should be compiled for the AVR atmega2560.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
@mihaiserban
mihaiserban / custom_scrollbar.css
Created April 1, 2019 10:58
custom scrollbar ::-webkit-scrollbar
View custom_scrollbar.css
/* total width */
::-webkit-scrollbar {
width: 14px;
}
::-webkit-scrollbar-track {
box-shadow: inset 0 0 14px 14px transparent;
border: solid 4px transparent;
}
@mihaiserban
mihaiserban / .ebignore
Created March 15, 2019 21:25
deploy Next.JS on AWS Elastic Beanstalk using YARN as package manager
View .ebignore
node_modules
@mihaiserban
mihaiserban / sync_fork.md
Created March 1, 2019 11:42
Sync a github repo from the original fork
View sync_fork.md
  1. Clone your favorite project:

git clone https://github.com/teleporthq/teleport-code-generators.git

  1. Add remonte branch:

git remote add --track master teleporthq https://github.com/teleporthq/teleport-code-generators.git

  1. Verify if the remote was added: