Skip to content

Instantly share code, notes, and snippets.

@mr-fool
mr-fool / Division.asm
Created June 19, 2014 16:59
Division x86 asm tasm syntax
;program that divide 6 by 3
.model small
.stack 200h
.code
Start:
mov ax,6 ;preparing the dividend
mov dx,0 ;zero extension
mov cx,3 ;preparing the divisor
div cx ;divides AX by CX, with quotient being stored in AX, and remainder in DX
mov ah, 4ch ;preparing exit call
@mr-fool
mr-fool / web_crawler.py
Created September 14, 2014 18:02
simple python 3 web crawler
import sys
import requests
import os
from bs4 import BeautifulSoup
def main():
os.system('clear') # on linux / os x
#Gathering necessary input from user
choice = int( input("1 to use the basic function, 2 for the advance crawling, 3 for exit\n") )
@mr-fool
mr-fool / hello_world.ino
Created August 4, 2020 00:58 — forked from buzzkillb/hello_world.ino
ESP32 TTGO button 1 and 2 masher with screen and serial example display
//simple button masher esp32 ttgo
#include <TFT_eSPI.h>
#include <SPI.h>
#define BUTTON1PIN 35
#define BUTTON2PIN 0
TFT_eSPI tft = TFT_eSPI();
void IRAM_ATTR toggleButton1() {
var TruffleContract = require("truffle-contract");
App = {
web3Provider: null,
contracts: {},
account: "0x0",
loading: false,
tokenPrice: 1000000000000000,
tokensSold: 0,
tokensAvailable: 750000,
{
tx: '0xca54c977937650be1838edfec3f72043208f15ca7a13c7da517d2f77b16892a0',
receipt: {
transactionHash: '0xca54c977937650be1838edfec3f72043208f15ca7a13c7da517d2f77b16892a0',
transactionIndex: 0,
blockHash: '0xa3b4db92527b12adb0dbe883fb6d4aa9d97136c7bdba7a066fa40b20d55a7e3d',
blockNumber: 79,
from: '0x9cb1cfefe3eec69f009304dc2f6295dcb97ff89e',
to: '0x44bc4edf3afad87dad89a2c7840c6d47bbce0184',
gasUsed: 292562,
import React, { Component } from "react";
import "./App.css";
import contractData from "./voting";
import Web3 from "web3";
const web3 = new Web3(window.web3.currentProvider);
class App extends Component {
state = {
players: [],
normie: 0,
{
"Campaign.sol": {
"Campaign": {
"abi": [
{
"constant": false,
"inputs": [
{
"name": "index",
"type": "uint256"
import getWeb3 from './web3';
import Web3 from "web3";
const web3 = getWeb3();
const address = '0x8895B2ed3EF4F4f66d048A3F215aC0DeA9Eb6777';
const abi =[ { constant: true,
inputs: [],
name: 'manager',
outputs: [ [Object] ],
payable: false,
import Web3 from 'web3';
const web3 = new Web3(window.web3.currentProvider);
window.addEventListener('load', async () => {
// Modern dapp browsers...
if (window.ethereum) {
window.web3 = new Web3(ethereum);
try {
// Request account access if needed
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Users\hetzer\Documents\GitHub\Lottery> node deploy.js
Attempting to deploy from account 0x1833797D31e3aA4fDc6BCED352B0cD8256a514a2
[ { constant: true,
inputs: [],
name: 'manager',
outputs: [ [Object] ],
payable: false,