Skip to content

Instantly share code, notes, and snippets.

View adilanchian's full-sized avatar
🤘

Alec Dilanchian adilanchian

🤘
View GitHub Profile

Keybase proof

I hereby claim:

  • I am adilanchian on github.
  • I am adilanchian (https://keybase.io/adilanchian) on keybase.
  • I have a public key ASBfCjg6OJBGUhN3R8LXHebcT2GTnrRW8oHVjZsfQK9-jAo

To claim this, I am signing this object:

@adilanchian
adilanchian / script.js
Created October 18, 2021 22:36
Async Stuff
const asyncMethod = async () => {
console.log('Running asyncMethod...');
const promise = new Promise((resolve, reject) => {
setTimeout(() => {
console.log('Waited 2 seconds!');
resolve({ data: 'SomeData' });
}, 2000);
});
@adilanchian
adilanchian / App.js
Last active February 25, 2023 11:59
Section 5: Update UI + deploy to an Ethereum testnet so anyone on the internet can wave at you using their
import React, { useEffect, useState } from "react";
import { ethers } from "ethers";
import './App.css';
import wavePortal from './utils/WavePortal.json';
const App = () => {
const [currentAccount, setCurrentAccount] = useState("");
const [allWaves, setAllWaves] = useState([]);
const contractAddress = "0xd5f08a0ae197482FA808cE84E00E97d940dBD26E";
@adilanchian
adilanchian / App.js
Last active March 6, 2023 09:37
Section 4: Update WavePortal to randomly send lucky users waving at you some Ethereum
import React, { useEffect, useState } from "react";
import { ethers } from "ethers";
import './App.css';
import wavePortal from './utils/WavePortal.json';
const App = () => {
const [currentAccount, setCurrentAccount] = useState("");
const [allWaves, setAllWaves] = useState([]);
const contractAddress = "0xd5f08a0ae197482FA808cE84E00E97d940dBD26E";
@adilanchian
adilanchian / App.js
Last active March 15, 2023 09:32
Section 3: Build web3 app that connects to our wallet and talks to our WaveContract
import React, { useEffect, useState } from "react";
import { ethers } from "ethers";
import './App.css';
import abi from './utils/WavePortal.json';
const App = () => {
const [currentAccount, setCurrentAccount] = useState("");
/**
* Create a varaible here that holds the contract address after you deploy!
*/
@adilanchian
adilanchian / WavePortal.sol
Last active November 2, 2023 06:07
Section 2: Write and deploy your WavePortal smart contract to a local Ethereum network
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "hardhat/console.sol";
contract WavePortal {
uint256 totalWaves;
constructor() {
@adilanchian
adilanchian / FAQ.md
Last active August 15, 2020 07:06
Pixelogic's Saturday Standup Podcast Moderator FAQ

The Main Goal

The main goal here is simple - stay interactive with the chat when you feel like it and remove dem trolls! There will be less interaction with chat during these Podcast streams, just as a FYI.

New Commands

!standup - "Welcome to The Saturday Standup Podcast! Today we are talking with {EnterGuestHere} ({EnterSomeSocialLink}) about the future of live programming streams. Have a question? Use !q and your question to be answered by Alec or {EnterGuestHere} at the end of the stream!"

!question - "Have a question for {EnterGuestHere} or Alec? Use !q and then your question to add it to the queue!"

I think these should be pretty self explanatory, but please let me know if you need more clarity.

import UIKit
/*
Protocol Definition: A protocol defines a blueprint of methods, properties, and other requirements that suit a particular
task or piece of functionality.
(https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Protocols.html)
*/
/*
This protocol, GreetFriendDelegate, requires any conforming type to have an instance method called greetFriend, which
@adilanchian
adilanchian / ARSceneViewExample.swift
Created December 24, 2017 03:55
ARKit Basics w/Physics
//-- Center Middle Overlay --//
@IBOutlet weak var centerOverlayView: UIView!
//-- AR Properties --//
@IBOutlet weak var arSceneView: ARSCNView!
let useARView = true
var screenCenter: CGPoint = CGPoint()
var planeAnchors = [ARPlaneAnchor]()
//-- Scenekit Properties --//