Skip to content

Instantly share code, notes, and snippets.

View espinz's full-sized avatar

Francisco Espinoza espinz

  • USA
View GitHub Profile
@espinz
espinz / comment.sh
Created February 13, 2019 10:41
A multi-line comment
: << "END"
This is a heredoc.
Line one
and
Line two.
END
@espinz
espinz / delete.sh
Created February 19, 2019 14:19
Delete everything in a git folder
find . -maxdepth 1 ! -name "*.git*" -exec rm -rf \{\} \;
@espinz
espinz / hello.sh
Created February 26, 2019 10:09
Running Hello World with echo
#!/bin/bash
echo hello world!
@espinz
espinz / keytoremote.sh
Created April 16, 2019 07:45
Copy a local public key into a remote host
# Useful snippet: copy a public key into a remote host
cat .ssh/id_rsa.pub | ssh usr@target 'cat >> .ssh/authorized_keys'
@espinz
espinz / README.md
Last active June 8, 2025 03:59
Debian Headless install - simple-cdd

Description

The following will create an automated custom debian iso image using simple-cdd.
Copy the iso to the USB. Plug in the USB and press power; it will automatically restart with a fresh debian install. No prompts, or typing required. Barebone and vm tested.

Jump to Code
Anchor links do not work on github gists. please scroll down.

Install the required package

@espinz
espinz / delete1M.sh
Created April 28, 2019 06:53
How to delete too many files
find . -type f -exec rm -rf {} \;
@espinz
espinz / new_post.sh
Created May 9, 2019 23:59
Jekyll posting script
#!/bin/bash
length=8
printf -v line '%*s' "$length"
echo ""
printf "%s\n" "New Post"
echo ${line// /-}
@espinz
espinz / dayCounter.cpp
Created May 18, 2019 20:10
A C++ loop to count days
int dayType::set_newahead()
{ //start get_newahead
day += ahead;
while (day > 7)
day = day - 7;
return day;
} //end get_newahead
@espinz
espinz / bashScript.sh
Created May 24, 2019 07:24
bashScript.sh
#!/usr/bin/env bash
echo "Hello World"
@espinz
espinz / cPlus.cpp
Created May 24, 2019 07:24
cPlus.cpp
#include <iostream>
using namespace std;
int main (){
cout << "Hello World";
}