Skip to content

Instantly share code, notes, and snippets.

View espinz's full-sized avatar

Francisco Espinoza espinz

  • USA
View GitHub Profile
@espinz
espinz / cProgram.c
Created May 24, 2019 07:24
cProgram.c
#include <stdio.h>
int main() {
printf("Hello, World!");
return 0;
}
@espinz
espinz / jsApp.js
Created May 24, 2019 07:24
jsApp.js
console.log("Hello World");
@espinz
espinz / pythonProgram.py
Created May 24, 2019 07:24
pythonProgram.py
#!/usr/bin/env python3
print("Hello World")
@espinz
espinz / swiftApp.swift
Created May 24, 2019 07:24
swiftApp.swift
print("Hello World")
@espinz
espinz / terminalRecording.md
Created August 16, 2019 16:06
Terminal recording

recterm and ttygif

Download, and install, required files via git and homebrew

git clone https://github.com/rascoro1/recterm.git ~/recterm

Install via homebrew

for i in `grep -H "jpg" *| grep "thumbnail:" | awk {'print $2'} | sed s#/images/##`; do mv ../images/$i ../images/backup;done
@espinz
espinz / directories.sh
Created September 17, 2019 22:13
renaming directories
COUNT=$(ls | grep -E "Chapter\ [0-9]" | cut -d ' ' -f 3-10 | wc -l)
for x in `seq 0 $COUNT`; do
if [ "$x" -eq "0" ]; then
newDIRS=$(ls | grep -E "Chapter\ [0-9]" | cut -d ' ' -f 3-10 | head -n 1)
mkdir "$x. ${newDIRS}"
else
DIRS=$(ls | grep -E "Chapter\ [0-9]*" | sort -k2 -n | cut -d ' ' -f 3-10 | tail -n 15 | sed -n ${x}p)
newDIRS=$(ls | grep -E "Chapter\ [0-9]" | cut -d ' ' -f 3-10 | sed -n ${x}p)
mkdir "$x. ${DIRS}"
@espinz
espinz / Making Directories.sh
Last active September 26, 2019 16:43
creating directories from a list
cat Study.org| grep Chapter | head -n 9 > holder.txt && xargs -0 -n 1 mkdir < <(tr \\n \\0 <holder.txt) && rm holder.txt
@espinz
espinz / firecracker.sh
Last active October 29, 2019 07:17
Finding an explosion of files and moving them into a new folder
find . -type d \( -path ./directory1 -o -path ./directory2 \) -prune -o -iname "*.txt" -print -exec mv {} TXT \;
@espinz
espinz / find.md
Last active November 2, 2019 11:11
BSD find recipes

Find

Recipes for the find command

Exclude directories

find . -type d ( -path ./directory1 -o -path ./directory2 ) -prune -o -iname "*.txt" -print -exec mv {} TXT ;

Delete all files in a git directory

find . -maxdepth 1 ! -name ".git" -exec rm -rf {} ;