Skip to content

Instantly share code, notes, and snippets.

View pors's full-sized avatar

Mark Pors pors

  • Den Haag, The Netherlands
  • X @pors
View GitHub Profile
@kourge
kourge / jslike.code-snippets
Created March 3, 2021 23:20
a VS Code snippet for typing in JS imports module-first, like the order in Python
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
"Named import": {
"scope": "javascript,javascriptreact,typescript,typescriptreact",
"prefix": "from",
@asiedubrempong
asiedubrempong / mnist_full_chapter_4.ipynb
Created April 11, 2020 21:23
Reproduction of chapter 4 of the fastai book using the full MNIST dataset
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Portal Network - Integration ENS with IPFS

This tutorial is how to post website/application on IPFS and link with ENS domains(.eth).

If you have any question please contact us for help:

@ecurrencyhodler
ecurrencyhodler / (Deprecated)LTC-Lightning-Network-lnd-Guide (Mac).md
Last active December 18, 2023 02:32
This is a step-by-step main net tutorial on how to setup a lightning network node for Litecoin on a Mac. It will take you from the beginning all the way through to becoming visible on a ln explorer. To send or recieve payments, refer to "Basic lnd Commands."

LTC-Lightning-Network-lnd-Guide

This is a step-by-step main net tutorial on how to setup a Lightning Network node for Litecoin on a Mac. It is specifically for the lnd client by the Lightning Labs. You can copy and paste most of the commands except for the times I've indicated in bold for you to input your own information. It would also be a good idea to backup your computer prior to starting just in case you need to start over.

Below is a legend. Refer to it as you come across terms or symbols you don’t understand. The first part of the tutorial is taken from the lnd github. However, everything else is written with the help of Patrick Walters taking me step by step through the process.

Legend

$ = This symbol means 1 line of code. Do not type “$” into your terminal. Simply input what follows then push enter.

Pubkey = Short for the public key that is generated from the private key w

@markerikson
markerikson / redux-thunk-examples.js
Last active September 4, 2022 11:12
Redux-Thunk examples
// The classic AJAX call - dispatch before the request, and after it comes back
function myThunkActionCreator(someValue) {
return (dispatch, getState) => {
dispatch({type : "REQUEST_STARTED"});
myAjaxLib.post("/someEndpoint", {data : someValue})
.then(
response => dispatch({type : "REQUEST_SUCCEEDED", payload : response}),
error => dispatch({type : "REQUEST_FAILED", error : error})
);
@joakin
joakin / git-find-me-the-fucking-deleted-file.sh
Last active May 6, 2024 22:24
finding a deleted file in a git repository
# If you don't remember the exact path/name, search the log for deleted files
git log --diff-filter=D --summary | grep delete
# Find the file you want to get from the ouput, and use the path
# Find the commits that involved that path
git log --all -- some/path/to/deleted.file
# Bring the file back to life to the current repo (sha commit of parent of commit that deleted)
git checkout shaofthecommitthatdeletedthefile^ -- some/path/to/deleted.file
@Bouke
Bouke / gist:11261620
Last active August 3, 2023 01:46
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9

@lrvick
lrvick / flask_geventwebsocket_example.py
Created September 1, 2011 07:17
Simple Websocket echo client/server with Flask and gevent / gevent-websocket
from geventwebsocket.handler import WebSocketHandler
from gevent.pywsgi import WSGIServer
from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@rslinckx
rslinckx / sadebug.py
Created October 14, 2010 21:27
SQLAlchemy Query debug helper for Flask and Flask-SQLAlchemy
import logging
log = logging.getLogger(__name__)
from werkzeug import Response, Template
import re
import cgi
import time
import uuid
from flask import request, Response, abort