Skip to content

Instantly share code, notes, and snippets.

@rikka0w0
rikka0w0 / vsftpd_setup_anonymous_upload_download.md
Last active May 8, 2024 14:27
[vsftpd]Setup anonymous upload and download FTP server

Install vsftpd

# Install
sudo apt update
sudo apt install vsftpd
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.orig

# Firwall rules
sudo ufw allow ftp-data
sudo ufw allow ftp
@rickdaalhuizen90
rickdaalhuizen90 / .bashrc
Created February 12, 2017 17:20
Parrot Os bash theme for ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@polius
polius / rds-snapshots.sh
Last active May 8, 2024 14:27
Extract all AWS RDS manual snapshots from all regions into a CSV file.
account="123456789"
echo "Account, Region, SnapshotCreateTime, DBSnapshotIdentifier, DBInstanceIdentifier, Engine, AllocatedStorage" > "$account.csv"
for region in $(aws ec2 describe-regions --profile customer --query "Regions[].RegionName" --output text); do
echo "Region: $region"
snapshots=$(aws rds describe-db-snapshots --profile customer --region $region --query "DBSnapshots[?SnapshotType=='manual'].[SnapshotCreateTime, DBSnapshotIdentifier, DBInstanceIdentifier, Engine, AllocatedStorage]" --output json)
if [ -n "$snapshots" ]; then
echo "$snapshots" | jq -r --arg account "$account" --arg region "$region" '.[] | "\"\($account)\",\"\($region)\"," + @csv' >> "$account.csv"
fi
done
@nhoffman
nhoffman / pyscript.py
Last active May 8, 2024 14:26
Python script template
#!/usr/bin/env python3
"""A simple python script template.
"""
import os
import sys
import argparse
@calvince
calvince / .bashrc
Last active May 8, 2024 14:24
make ubuntu terminal look like parrot os terminal. use nano .bashrc from the terminal then replace older baashrc with the new parrot os bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@amalmurali47
amalmurali47 / edit_commit_history.md
Last active May 8, 2024 14:23
Change ownership of selected older commits in Git
  1. Clone the repo.
  2. Use git rebase -i --root
  3. vim will open. Select the commits you want to modify by changing pick to edit. If you would like to change all the commits, perform the following replace: :%s/^pick/edit/g. This command changes all instances of "pick" at the start of lines to "edit".
  4. You will now be shown all the selected commits one by one. Each commit message will be displayed. You have two options:
    • If you would like to keep the commit author details the same, do a git rebase --continue.
    • If you would like to change it to a different name/email, do git commit --amend --reset-author. If --reset-author is specified, it will use the details from your git config. (If you need to specify an alternate name/email, you can do so with --author="John Doe <john@example.com>". If you would like to change the time to a previous date, you can do so with --date "2 days ago".)
  5. Do the same for all the commits and finish the rebase.
  6. Perform git push -f origin master to
@realvjy
realvjy / ChoasLinesShader.metal
Last active May 8, 2024 14:23
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@ingo-m
ingo-m / debian_install_nvidia_docker.md
Last active May 8, 2024 14:21
Install nvidia docker for GPU-enabled tensorflow on Debian 10

Install nvidia docker for GPU-enabled tensorflow on Debian 10

Overview

  1. Install proprietary nvidia driver
  2. Install nvidia-container-toolkit, containing CUDA (?) (via apt-get)
  3. Install tensorflow docker container

(1) Install proprietary nvidia driver

@reborg
reborg / rich-already-answered-that.md
Last active May 8, 2024 14:20
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

@skippednote
skippednote / setup-tor.md
Last active May 8, 2024 14:20
Setup Tor on macOS

Setup One: Buy a Mac if you don't have one.

Setup Two: Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Setup Three: