// Work-in-progress // script to install jekyll on ZSH.
Installation reference on MacOS Catalina running ZSH shell
which ruby
which gem
import csv | |
import requests | |
from bs4 import BeautifulSoup | |
import pandas as pd | |
from tqdm import tqdm | |
def get_description(url): | |
try: | |
response = requests.get(url) | |
soup = BeautifulSoup(response.text, "html.parser") |
/* AVAILABLE DATE RANGES: | |
TODAY | YESTERDAY | LAST_7_DAYS | THIS_WEEK_SUN_TODAY | THIS_WEEK_MON_TODAY | LAST_WEEK | | |
LAST_14_DAYS | LAST_30_DAYS | LAST_BUSINESS_WEEK | LAST_WEEK_SUN_SAT | THIS_MONTH | |
*/ | |
function getYesterdaysDate() { | |
var date = new Date() | |
date.setDate(date.getDate() - 1) | |
var currentMonth = date.getMonth() + 1 | |
var formatMonth = currentMonth < 10 ? '0' + currentMonth : currentMonth |
# Terminal Cheat Sheet | |
pwd # print working directory | |
ls # list files in directory | |
cd # change directory | |
~ # home directory | |
.. # up one directory | |
- # previous working directory | |
help # get help | |
-h # get help |
; ---------------------------------------------------------------------------------------- | |
; How to compile and run .asm files on macOS: | |
; ---------------------------------------------------------------------------------------- | |
; | |
; 1. Download and open nasm-x.xx.xx-tar.gz from www.nasm.us | |
; 2. Open terminal and change directory to the opened folder | |
; 3. Enter the command "./configure" to run the configure script | |
; 4. Type in the "make" command to build nasm | |
; 5. Type in "sudo make install" to copy the built program to "/usr/bin/nasm" | |
; 6. Add this new directory to the paths file using "sudo nano /etc/paths" |
import Foundation | |
extension String { | |
var isValidEmail: Bool { | |
let emailFormat: String = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}" | |
let emailPredicate = NSPredicate(format: "SELF MATCHES %@", emailFormat) | |
return emailPredicate.evaluate(with: self) | |
} | |
} |
const int ledCount = 10; | |
int ledPins[] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; | |
void setup() { | |
for (int i = 0; i < ledCount; i++) { | |
pinMode(ledPins[i], OUTPUT); | |
} | |
} | |
void loop() { |
int pin1Led = 4; | |
int pin2Led = 5; | |
void setup() { | |
pinMode(pin1Led, OUTPUT); | |
pinMode(pin2Led, OUTPUT); | |
} | |
void loop() { | |
setLed(HIGH, LOW); |
void setup() { | |
pinMode(13, OUTPUT); | |
} | |
// the loop function runs over and over again forever | |
void loop() { | |
delay(500); | |
blink(); | |
delay(500); | |
blink(); |
echo "Initialize $0 script..." | |
git add . | |
git commit -m "$1" | |
git push -u origin master | |
git log --oneline | |
echo "$0 successful." | |
echo "--------------------------------" | |
# -------------------------------- | |
# Usage on MacOS |