Skip to content

Instantly share code, notes, and snippets.

View timsully's full-sized avatar
🧠

Tim Sullivan timsully

🧠
View GitHub Profile
@timsully
timsully / Intro to the Terminal.txt
Last active April 3, 2018 03:34
An introduction to keys used in the terminal for beginners and for reference
Control + A = takes you to the very beginning of the line
Control + E = takes you to the very end of the line
Press the up key = references previous commands in history
Press the down key = allows you to navigate back down towards other commands if you have already gone up
echo ~ = variable for the home directory of your computer
@timsully
timsully / Terminal Navigation
Created April 3, 2018 03:31
Shortcut keys to reference for those interested in becoming more productive in the terminal.
ls - lists all contents of our home directory
*you can also use ls as an argument* *you can also pass two arguments with ls and it will display the contents of both directories* (using absolute or relative paths)
example: "ls Documents" - this would display all the contents of the Documents folder
example: "ls /Users/js/Documents"
example: "ls ~/Documents"
*be sure to type in the right case since it is case sensitive
pwd (print working directory) - returns working directory name
@timsully
timsully / Terminal Make, Move, Copy, Link Files
Created April 3, 2018 03:32
terminal keys for reference to make move copy and link file
@timsully
timsully / Terminal: Finding Files
Created April 3, 2018 03:36
A list of commands/arguments to reference back to on finding files in specific ways.
find = searches for files
example: find ~/Documentqs
find . = searches current directory
find . -type f = searches for files that happen to be files(finds all files recursively through the directory that your in)
find . -name "typeNameYourSearchingFor" = you can also find the name that you are looking for by typing it inbetween the quotations
find . -name "*.txt" = allows you to search for all the files that end in .txt(within that directory)
@timsully
timsully / Terminal: Permissions & How to Change Them
Created April 3, 2018 03:37
A list of terminal commands to view and modify permissions on files.
Say you were to create a text file via terminal by using the command "touch aFile.txt"
*once you have created it make a detailed list using "ls -l"
* -l in the command gives more information about the file
Once you press enter you will see a line with the following code.
example:
-rw-r--r-- 1 user staff 0 Apr 15 3:44 aFile.text
user = this part shows user
@timsully
timsully / web-servers.md
Created June 24, 2018 04:36 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Returns the result of the shell command
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111
/* --------------------------------
Typography
-------------------------------- */
:root {
--font-primary: sans-serif;
--font-secondary: serif;
@timsully
timsully / repeat_yourself.rb
Created March 5, 2019 04:58
PEDAC Process
=begin
Problem
Write a method that takes two arguments, a string and a positive integer, and
prints as many times as the integer indicates.
PEDAC, Breaking Down the Problem:
Inputs:
- takes two arguments
- a string and a positive integer
@timsully
timsully / Effective Color Scheme
Created October 29, 2019 00:36
Proposal for naming convention of colors for Effective.
// Thoughts on construction?
//// Example of variables
// Grey 1 - 5
$grey1: #acacad;
$grey2: #707070;
$grey3: #505158;
$grey4: #707070;
$grey5: #33343b;