Skip to content

Instantly share code, notes, and snippets.

View Ceheiss's full-sized avatar

Cristóbal Heiss Ceheiss

View GitHub Profile
@Ceheiss
Ceheiss / .gitconfig
Created October 19, 2020 14:19
Configure Git
[user]
name = Cristobal Heiss
email = barbacoabq@gmail.com
[core]
editor = nano
[alias]
hist = log --oneline --graph --decorate --all
[diff]
tool = p4merge
[difftool "p4merge"]
@Ceheiss
Ceheiss / build-ts-project.sh
Created October 18, 2020 11:31
Bash script to build a TypeScript project
#! /bin/bash
echo 'Name of the project?'
read projectName
mkdir $projectName
cd $projectName
echo "Generating $projectName for you..."
touch index.ts package.json
echo '{
"name": "ts",
"version": "1.0.0",
@Ceheiss
Ceheiss / lotrquotes.json
Last active August 26, 2020 10:05
Quotes from Lord of The Rings
{
"quotes": [
"It's a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to.",
" End? No, the journey doesn't end here. Death is just another path, one that we all must take. The grey rain-curtain of this world rolls back, and all turns to silver glass, and then you see it.",
"Some who have read the book, or at any rate have reviewed it, have found it boring, absurd, or contemptible, and I have no cause to complain, since I have similar opinions of their works, or of the kinds of writing that they evidently prefer.",
"Home is behind, the world ahead, and there are many paths to tread through shadows to the edge of night, until the stars are all alight.",
"A cold voice answered: 'Come not between the Nazgûl and his prey! Or he will not slay thee in thy turn. He will bear thee away to the houses of lamentation, beyond all darkness, where thy flesh shall be devoured, and thy shrivelled mind be left na
@Ceheiss
Ceheiss / random.js
Last active November 15, 2019 12:31
const getRandomInts = function(){return Math.floor(Math.random() * 10)};
const makeRandomInt= () => {
let date = new Date();
let getNumbers = String(date.getMilliseconds());
let randomNum = getNumbers[getNumbers.length -1];
return Number(randomNum)
}
const allDigits = {
#!/bin/bash
echo "Building this for you Cristobal"
cd ~/Documents/my-repos
mkdir $1
cd $1
mkdir src
touch SET-UP.txt
curl https://gist.githubusercontent.com/Ceheiss/804ef5b4be20e2c3c2fef49914a1c3fb/raw/1f97210c63fec0f5c9fb23e4360ceaaa750eb7a0/basic-setup.txt > SET-UP.txt
touch .gitignore
touch src/app.js
=================================
------- PROJECT SETUP ---------
=================================
Hello, don't forget to do the following things in your brand new basic Node App:
"scripts": {
"test": "jest",
"format": "prettier src/*.js --write"
}
#!/bin/bash
echo "Building a complete project for you"
cd ~/Documents/my-repos
mkdir $1
cd $1
mkdir src
mkdir dist
touch .gitignore
touch .babelrc
touch src/app.js
@Ceheiss
Ceheiss / SET-UP-FILE.txt
Created November 14, 2019 15:32
File used for my node projects
=================================
------- PROJECT SETUP ---------
=================================
Hello, don't forget to do the following things in your brand new Node App:
To use Jest, build with babel and send it to dist folder, and format everything with prettier (you can add src after jest if you want to test all the files):
"scripts": {