Skip to content

Instantly share code, notes, and snippets.

@jaydorsey
jaydorsey / ublock
Last active June 2, 2024 17:01
uBlock for LinkedIn
# Block things on LinkedIn with uBlock Origin that LinkedIn won't let you block
# Choose "Options" in uBlock Origin with a right-click, and add these to
# "My filters"
# ADDING YOUR OWN FILTERS
#
# Using Linkedin.com as an example
#
# 1. Open up the webpage
# 2. Find some text you want to block
@0atman
0atman / README.md
Last active June 2, 2024 17:01
The Testable Documentation Manifesto

#! blaze sh

The Testable Documentation Manifesto

One of the problems with tech documentation (api, installation instructions etc) is that they get stale. APIs change, software and plugins alter their interface and commands, and websites go away.

To solve this, I propose we write our documentation in a way that can be executed, or verified.

Luckily, I wrote blaze to execute codeblocks inside of markdown, which means that with a little help from a few common unix tools, we can solve this problem.

@BlockmanCodes
BlockmanCodes / 01_deployContracts.js
Created October 31, 2022 00:58
Add Uniswap V3 pool liquidity locally
const { Contract, ContractFactory, utils, BigNumber } = require("ethers")
const WETH9 = require("../WETH9.json")
const artifacts = {
UniswapV3Factory: require("@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json"),
SwapRouter: require("@uniswap/v3-periphery/artifacts/contracts/SwapRouter.sol/SwapRouter.json"),
NFTDescriptor: require("@uniswap/v3-periphery/artifacts/contracts/libraries/NFTDescriptor.sol/NFTDescriptor.json"),
NonfungibleTokenPositionDescriptor: require("@uniswap/v3-periphery/artifacts/contracts/NonfungibleTokenPositionDescriptor.sol/NonfungibleTokenPositionDescriptor.json"),
NonfungiblePositionManager: require("@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json"),
WETH9,
@lawrenceching
lawrenceching / install-frp-as-systemd-service.sh
Last active June 2, 2024 16:55
Install frp as systemd service
# Update on 2024/04/13
# 1. Improved OS compatibility: try wget and then curl for downloading files.
#
# Update on 2024/01/26
# 1. Thanks to GitHub user @aka-Ani, this script now will install latest version of frp:
# https://gist.github.com/lawrenceching/41244a182307940cc15b45e3c4997346?permalink_comment_id=4851742#gistcomment-4851742
# 2. Use .toml conf file as .ini became lagacy
#
# Update on 2023/06/19
# 1. frp no longer provide systemctl service file. This script creates frpc/fprs systemctl service file by itself
@aallan
aallan / lcd_imc_test.py
Created March 13, 2023 11:35
Micropython example code for the RP2040 1.28-inch TFT display watch board
'''
I2C_SDA -> 6
I2C_SDA -> 7
DC -> 8
CS -> 9
SCK -> 10
DIN -> 11
RST -> 12
BL -> 25
BAT_ADC -> 29

Pip is a package manager of python. You can download Python libraries from some Python repositories like PyPI. You can also download libraries from a git repository. This is gonna be the issue to be explained in this article.

I don't like to memorize things all the time. So, I guess, I couldn't be working without internet :). Whenever I need to install some python libraries from a git repositories, I see a lot of way to do it. It is really confusing. This should be the reason why I can't memorize it. I can see how a very simple requirement is handled with to many confusing way. There shouldn't be to many way. Some of them is not working neither. At last, I decided to blog it.

As you may know, you can use two protocols which are http and ssh to do something on git repositories. Using protocol ssh instead of http may provide some ease of use. Because of nature of ssh, you can do something with your primary/public keys. So, you don't have to input your credentials all the time. But I'll be

@hihebark
hihebark / ListOfHospitalsInAlgeria.json
Last active June 2, 2024 16:50
List of hospitals in Algeria - Liste des hôpitaux en Algérie - قائمة المستشفيات في الجزائر
{
"1": {
"name": "Wilaya d'Adrar",
"code": 1,
"hospital": [
"Hôpital d'Adrar|Hôpital Ibn Sina d'Adrar",
"Hôpital de Timimoun|Hôpital Mohamed Hachemi de Timimoun",
"Hôpital de Reggane",
"Hôpital d'Aoulef|Hôpital Noureddine Sahraoui d'Aoulef",
"Hôpital de Bordj Badji Mokhtar",
@NeilAlishev
NeilAlishev / MySpringMvcDispatcherSerlvetInitializer.java
Created October 16, 2020 12:32
HiddenHttpMethodFilter Java-based configuration
import org.springframework.web.filter.HiddenHttpMethodFilter;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
public class MySpringMvcDispatcherSerlvetIntitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
@Override
protected Class<?>[] getRootConfigClasses() {
@rxaviers
rxaviers / gist:7360908
Last active June 2, 2024 16:48
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: