Skip to content

Instantly share code, notes, and snippets.

carlynorama carlynorama

Block or report user

Report or block carlynorama

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@carlynorama
carlynorama / challenges1.swift
Last active May 27, 2020
RW Closures Section
View challenges1.swift
//: ## Episode 08: Closures & Collections
// --------------------------------------
class Student {
let name: String
var grade: Int
var pet: String?
var libraryBooks: [String]
init(name: String, grade: Int, pet: String? = nil, libraryBooks: [String]) {
@carlynorama
carlynorama / whatday
Last active Apr 25, 2020
Utility for Day of the Week
View whatday
#!/usr/bin/env python3
#imports go here
import datetime
#functions go here
def printDay():
d = datetime.datetime.now()
#print(d.strftime("%A %d %B %Y"))
View Fabric_Mask_Tutorials.md
@carlynorama
carlynorama / BotanicalName
Created Jan 24, 2019
Botanical Name Script Filemaker
View BotanicalName
Let ( [
BasicName = If(IsEmpty(Genus);Family;Genus & " " & Species)
];
TextStyleAdd ( BasicName ; Italic ) )
&
If ( IsEmpty ( subspecies ) ; "";
Let (
@carlynorama
carlynorama / trangle_segment_generator.py
Last active Oct 28, 2018
Generates pattern of triangles, one segment at a time
View trangle_segment_generator.py
import math
save_file_name = "pattern"
def triangle(origin_x, origin_y):
A_x = triangle_half_base + origin_x
A_y = origin_y
B_x = triangle_side + origin_x
B_y = origin_y + triangle_height
C_x = origin_x
View mastodon_instances.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
In no particular order:
mastodon.social
mastodon.cloud
cybre.space
octodon.social
hackers.town
social.coop
chaos.social
mastodon.art
@carlynorama
carlynorama / sshkey.sh
Created Aug 14, 2018
RSA SSH Key Reminder Crib Sheet
View sshkey.sh
ssh-keygen -t rsa
#Enter file in which to save the key (/Users/$YOUR_USER_NAME/.ssh/id_rsa): $NAME_TO_USE
#Option 1, no sever exists yet
cat /Users/$YOUR_USER_NAME/.ssh/$NAME_TO_USE.pub
#copy paste that into wherever
sudo nano ~/.ssh/config
# Add host information into file
Host $HOST_SHORTCUT_NAME
Hostname $IP.ADD.ER.ESS
@carlynorama
carlynorama / last_tuesdays.py
Created May 31, 2018
Get the last Tuesday of the month
View last_tuesdays.py
#https://rosettacode.org/wiki/Find_the_last_Sunday_of_each_month#Python
import sys
import calendar
year = 2018
if len(sys.argv) > 1:
try:
year = int(sys.argv[-1])
except ValueError:
pass
@carlynorama
carlynorama / is_it_a_tuesday.py
Last active May 31, 2018
check if any date is a Tuesday
View is_it_a_tuesday.py
import datetime
import dateutil.parser #dateutil module
date = datetime.datetime.today()
def is_it_tuesday(date_to_check):
if date_to_check.weekday() == 1:
print("yes")
else:
print("no")
View is_it_tuesday.py
import datetime
date = datetime.datetime.today()
def is_it_tuesday(date_to_check):
if date_to_check.weekday() == 1:
print("yes")
else:
print("no")
You can’t perform that action at this time.