Skip to content

Instantly share code, notes, and snippets.

View iamsk's full-sized avatar
🎯
Focusing

Bin iamsk

🎯
Focusing
View GitHub Profile
@lewangdev
lewangdev / install-docker-ce-aliyun-debian.md
Last active September 4, 2024 07:12
在阿里云中国大陆机房的Debian系统上安装Docker服务和拉取dockerhub镜像

安装 docker-ce

# https://developer.aliyun.com/article/110806
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
@karmacoma-eth
karmacoma-eth / sending-ether-cheat-sheet.md
Last active August 22, 2024 17:07
Sending Ether Cheat Sheet

Sending Ether Cheat Sheet

TLDR

🥇 Instead of sending Ether, use the withdrawal pattern

🥈 If you really need to send Ether, use a safe wrapper like OpenZeppelin's Address.sendValue(addr, amount)

🥉 If you really need to send Ether without dependencies, use (bool success, ) = addr.call{value: amount}("")

@JofArnold
JofArnold / BoredApeYachtClub.sol
Last active April 9, 2023 12:44
The Bored Ape Yacht Club (BAYC) Solidity Smart Contract GitHub
/**
*Submitted for verification at Etherscan.io on 2021-04-22
*/
// File: @openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
@RobertAKARobin
RobertAKARobin / python.md
Last active October 12, 2024 17:37
Python Is Not A Great Programming Language
@mayneyao
mayneyao / notion2blog.js
Last active September 14, 2024 01:22
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active November 16, 2024 15:08 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@jimmywarting
jimmywarting / readme.md
Last active November 15, 2024 12:47
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@tejpratap46
tejpratap46 / removeDuplicateFromMongoDB.js
Created July 12, 2016 11:19
Delete duplicates from mongodb
`dropDups: true` option is not available in 3.0.
I have solution with aggregation framework for collecting duplicates and then removing in one go.
It might be somewhat slower than system level "index" changes. But it is good by considering way you want to remove duplicate documents.
a. Remove all documents in one go
var duplicates = [];
@binderclip
binderclip / catch-https.md
Last active September 20, 2018 10:05
使用 Charles 做一些抓包工作

HTTPS 抓包

普通的 HTTPS 抓包配置

一般的公开的网站用这种方式就好了。

  1. 首先装上 Charles 的根证书    1. 电脑的话:Help -> SSL Proxying -> Install Charles Root Cetificate    2. 手机的话:Help -> SSL Proxying -> Install Charles Root Cetificate on a Mobile Device or Remote Browser 会有提示       1. 大概是在手机设置了代理之后用浏览器访问 chls.pro/ssl 来下载、安装证书