Skip to content

Instantly share code, notes, and snippets.

@pagreczner
pagreczner / nftp.md
Created December 14, 2021 12:39
NFT Proxy Idea

NFT Proxy

Overview / Goal

Proxy your NFT into a provable ERC-721 ownership format that can live in a different wallet from the proxied NFT. The proxied NFT can prove ownership while maintaining safety from the true asset by living in a different wallet. This proxied NFT can then be used safely for whitelists and other functions where signing a transaction may be connsidered "dangerous". This proxied NFT in theory could also be safely leased to other users in a way that NFTs can not be be done today.

Motivation

Many high end NFT collections that are have both significant underlying financial value and emotional value to users have become besieged by scammers and hackers. Part of the value in holding one of these NFTs is showing it off and being part of the community. However, in order to provably show it off you must expose your wallet to sign messages. Given the nascent UX in web3, it's not always easy to discern what is a trusted UX from an untrusted. And given that, there "should be a better way"

@pagreczner
pagreczner / codefresh_sonarqube.yaml
Last active September 1, 2020 21:14
Create a pipeline for running Sonarqube scanner as part of your Codefresh CI/CD process.
# This gist covers how to create a pipeline for running Sonarqube scanner as part of your Codefresh CI/CD process.
version: "1.0"
stages:
- "clone"
- "scan_pr"
- "scan_master"
steps:
clone:
title: "Cloning repository"
/*
https://golang.org/pkg/io/ioutil/
http://stackoverflow.com/questions/19253469/make-a-url-encoded-post-request-using-http-newrequest
https://github.com/gin-gonic/gin
http://stackoverflow.com/questions/3751429/reading-an-integer-from-standard-input-in-golang
*/
@pagreczner
pagreczner / client.go
Created April 23, 2015 18:45
Some files
/*
https://golang.org/pkg/io/ioutil/
http://stackoverflow.com/questions/19253469/make-a-url-encoded-post-request-using-http-newrequest
https://github.com/gin-gonic/gin
http://stackoverflow.com/questions/3751429/reading-an-integer-from-standard-input-in-golang
*/
package main
import (
"fmt"
@pagreczner
pagreczner / downgrade_npm.md
Last active March 15, 2021 14:20
Downgrade NPM Version to a Lower / Earlier Version

Downgrade NPM version to an earlier version

Problem

Found myself at a later version of NPM that I didn't want, and had trouble finding the resources online to explain how to go to a lower version.

Was at 1.2, did npm update npm -g and found myself at 2.0 and then was not able to go down to the desired 1.4.

If you find yourself at a more current version than you wish, follow these steps:

@pagreczner
pagreczner / negroniGorillaMux.go
Last active August 9, 2016 08:50
Negroni and Gorilla Mux with Middleware example - golang
package main
import (
"github.com/codegangsta/negroni"
"github.com/gorilla/mux"
)
func main() {
router := mux.NewRouter()
apiV1 := router.PathPrefix("/api/v1").Subrouter()
@pagreczner
pagreczner / gist_autosave.js
Last active April 3, 2022 20:54
Gist Autosave bookmark (Chrome only?)
javascript:(function(){
setInterval(function(){
console.log("Auto Saving...");
var data = $("#gist-form").serialize();
var actionUrl = $("#gist-form").attr('action');
try {
$.post(actionUrl, data); }
catch(err) {}
$("<p class='cjs-autosave'>Autosaved gist!</p>").insertAfter("div.main #gists");
$("p.cjs-autosave").fadeOut(4000);
@pagreczner
pagreczner / stopwords.js
Created April 22, 2014 18:37
stop words
var stopwords = ["a", "a's", "able", "about", "above", "according", "accordingly", "across", "actually", "after", "afterwards", "again", "against", "ain't", "all", "allow", "allows", "almost", "alone", "along", "already", "also", "although", "always", "am", "among", "amongst", "an", "and", "another", "any", "anybody", "anyhow", "anyone", "anything", "anyway", "anyways", "anywhere", "apart", "appear", "appreciate", "appropriate", "are", "aren't", "around", "as", "aside", "ask", "asking", "associated", "at", "available", "away", "awfully", "be", "became", "because", "become", "becomes", "becoming", "been", "before", "beforehand", "behind", "being", "believe", "below", "beside", "besides", "best", "better", "between", "beyond", "both", "brief", "but", "by", "c'mon", "c's", "came", "can", "can't", "cannot", "cant", "cause", "causes", "certain", "certainly", "changes", "clearly", "co", "com", "come", "comes", "concerning", "consequently", "consider", "considering", "contain", "containing", "contains", "correspondi