Skip to content

Instantly share code, notes, and snippets.

View nanthanwa's full-sized avatar

Nan Thanwa nanthanwa

  • Chiang Mai, Thailand
View GitHub Profile
@nanthanwa
nanthanwa / quixoticMultiMint.sol
Created June 11, 2022 18:55 — forked from yoyoismee/quixoticMultiMint.sol
quixotic multi mint
// SPDX-License-Identifier: MIT
// author: yoyoismee.eth
pragma solidity 0.8.14;
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
// @notice - free mint that allow contract to mint might not be the best idea ?
// @dev maybe you should add something like requrie(msg.sender == tx.origin) ?
// yeah not sure if this intended. but you know that 5 is not the limit right? I cound just mint up to the gas limit.
// I'll reach out to the creator to see if she want it back. but yeah maybe be more careful next time quixotic team.
@nanthanwa
nanthanwa / sonarqube-docker-compose.yml
Created July 1, 2019 05:17 — forked from Warchant/sonarqube-docker-compose.yml
docker-compose file to setup production-ready sonarqube
version: "2"
services:
sonarqube:
image: sonarqube
expose:
- 9000
ports:
- "127.0.0.1:9000:9000"
networks:
@nanthanwa
nanthanwa / README.md
Created May 23, 2017 16:54 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@nanthanwa
nanthanwa / promises.js
Created February 2, 2016 15:44 — forked from danthareja/promises.js
A conjurer's guide to promises
/*
* A quick example of how to use Bluebird and Q to conjure your own promises
*
* Everything going on here is explained further in the following video:
* http://youtu.be/OU7WuVGSuZw?list=PLT-DLWOBKbB4dZ83I_7Ca-sUTvorckG-E
*
*/
// Import node modules
var Q = require('q');
@nanthanwa
nanthanwa / app.js
Created January 25, 2016 10:17 — forked from sogko/app.js
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@nanthanwa
nanthanwa / Gulpfile.js
Created November 19, 2015 20:57 — forked from webdesserts/Gulpfile.js
Automatically reload your node.js app on file change with Gulp (https://github.com/wearefractal/gulp).
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise.
var gulp = require('gulp'),
spawn = require('child_process').spawn,
node;
/**
* $ gulp server
* description: launch the server. If there's a server already running, kill it.