Skip to content

Instantly share code, notes, and snippets.

View leopard627's full-sized avatar
🦖
Working from home

Leopard627 leopard627

🦖
Working from home
View GitHub Profile
@leopard627
leopard627 / tmux-cheatsheet.markdown
Created March 20, 2017 14:05 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@leopard627
leopard627 / gist:b5b7098f021b1bb22a4e7ae0e5b6f357
Created January 19, 2019 16:02 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@leopard627
leopard627 / docker-prom-stack.yml
Last active January 11, 2020 12:14 — forked from subicura/docker-prom-stack.yml
docker-prom-stack.yml
version: "3"
networks:
monitoring:
app-backend:
services:
cadvisor:
image: google/cadvisor:${CADVISOR_VERSION:-v0.26.1}
networks:
@leopard627
leopard627 / docker-stack.yml
Created January 10, 2020 17:22 — forked from subicura/docker-stack.yml
prometheus on swarm
# docker stack deploy --compose-file ./docker-stack.yml prom-stack
version: "3"
services:
prometheus:
image: prom/prometheus:latest
networks:
- monitoring
ports:
- 9001:9090
@leopard627
leopard627 / prometheus.yml
Created January 10, 2020 17:23 — forked from subicura/prometheus.yml
prometheus on swarm (2)
global:
scrape_interval: 30s
evaluation_interval: 30s
external_labels:
monitor: "prometheus-swarm"
rule_files:
scrape_configs:
- job_name: 'prometheus'
@leopard627
leopard627 / read-access.sql
Created November 13, 2020 07:42 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
@leopard627
leopard627 / dnsovertls.md
Created January 4, 2023 11:47 — forked from uraimo/dnsovertls.md
Configure your Mac to use DNS over TLS
@leopard627
leopard627 / MyNFT.sol
Created August 12, 2023 03:08 — forked from shobhitic/MyNFT.sol
Simple NFT Staking Smart Contract - https://youtu.be/m0w6JyqJKks
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol";
import "@openzeppelin/[email protected]/access/Ownable.sol";
contract MyNFT is ERC721, Ownable {
uint256 public totalSupply;
constructor() ERC721("MyNFT", "MNFT") {}