Skip to content

Instantly share code, notes, and snippets.

View zewebdev1337's full-sized avatar
💭
Certified shitposter

ZSW zewebdev1337

💭
Certified shitposter
  • 11:27 (UTC -05:00)
View GitHub Profile
#!/bin/bash
# Check if a filename is provided
if [ -z "$1" ]; then
echo "Usage: $0 <filename>"
exit 1
fi
# Use the provided filename
filename="$1"
#!/bin/bash
cat << 'EOF' >> deploy.sh
#!/bin/bash
cat << "EIF" >> internal_cat_output.txt
hello!
EIF
EOF
@zewebdev1337
zewebdev1337 / private-fork.md
Last active July 10, 2024 17:42 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)
    git clone --bare [email protected]:<original_username>/<original_repo>.git
@zewebdev1337
zewebdev1337 / sshd_config
Created November 19, 2023 21:17
based sshd_config
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
LoginGraceTime 2m
AuthorizedKeysFile .ssh/authorized_keys
X11Forwarding yes
TCPKeepAlive yes
Subsystem sftp /usr/lib/ssh/sftp-server
@zewebdev1337
zewebdev1337 / 20-ethernet.network
Last active October 25, 2023 17:16
Static IP address for arch linux KVM running systemd-networkd. Place at: /etc/systemd/network/20-ethernet.network
[Match]
# Matching with "Type=ether" causes issues with containers because it also matches virtual Ethernet interfaces (veth*).
# See https://bugs.archlinux.org/task/70892
# Instead match by globbing the network interface name.
Name=en*
Name=eth*
[Network]
DHCP=no
IPv6PrivacyExtensions=yes
@zewebdev1337
zewebdev1337 / .deps...npm...@openzeppelin...contracts...token...ERC721...ERC721.sol
Created December 1, 2022 23:42
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";