Skip to content

Instantly share code, notes, and snippets.

View PeterTheOne's full-sized avatar

Peter Grassberger PeterTheOne

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eccentricexit
eccentricexit / index.js
Created February 4, 2022 22:44
Querying NFT and NFT Collections
const fetch = require("node-fetch");
async function main() {
const collectionToCheck = `0xed5af388653567af2f388e6224dc7c4b3241c544`;
const nftCollectionsAddress = `0x2f19f817bbf800b487b7f2e51f24ad5ea0222463`;
console.info(
`Is the collection ${collectionToCheck} in the NFT registry (${nftCollectionsAddress})?`
);
console.info(
await isCollectionRegistered(collectionToCheck, nftCollectionsAddress)
@perfecto25
perfecto25 / resticheat.md
Last active August 3, 2024 12:05
Restic cheatsheet

Restic backup application - commands cheatsheet

Installation & config

  1. add Retic repo
  2. yum install restic

add a Restic credential file to root

vim /root/.restic
@nbraud
nbraud / .gitignore
Last active April 27, 2018 08:55
Tweet dump
/keys.py
__pycache__/
*.state
*.xz
@jcreedcmu
jcreedcmu / escape.js
Created February 19, 2018 18:09
Escaping nodejs vm
////////
// The vm module lets you run a string containing javascript code 'in
// a sandbox', where you specify a context of global variables that
// exist for the duration of its execution. This works more or less
// well, and if you're in control of the code that's running, and you
// have a reasonable protocol in mind// for how it expects a certain
// context to exist and interacts with it --- like, maybe a plug-in
// API for a program, with some endpoints defined for it that do
// useful domain-specific things --- your life can go smoothly.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dpalomar
dpalomar / .gitattributes
Created April 8, 2016 12:43
Fixing CRLF with gitattributes
From this [issue](https://github.com/puphpet/puphpet/issues/1025#issuecomment-157059174):
I know that this issue is closed, but as I spent a lot of time to understand what was going on, I made some researches and I can explain why this happen, and you can fix it.
Using git config core.autocrlf true can help, but not on a multi-developpers project.
This command has to be the same on each developper machine, and that's not always the case.
You have to use the .gitattributes provided in the puphpet archive and edit it as follow (carefull, this file need to be in your project root)
You also need to use an IDE that allow you to save/edit files as LF (like phpstorm). You can check the type of the file in the bottom right corner, in the status bar (you'll see LF or CRLF while a file is opened)
@dimi-tree
dimi-tree / 01-02.py
Last active February 2, 2022 20:41
Udacity: Machine Learning for Trading
# Working with multiple stocks
"""
SPY is used for reference - it's the market
Normalize by the first day's price to plot on "equal footing"
"""
import os
import pandas as pd
import matplotlib.pyplot as plt
@bonzanini
bonzanini / config.py
Last active September 3, 2024 07:38
Twitter Stream Downloader
consumer_key = 'your-consumer-key'
consumer_secret = 'your-consumer-secret'
access_token = 'your-access-token'
access_secret = 'your-access-secret'