Skip to content

Instantly share code, notes, and snippets.

View kyrose's full-sized avatar
🙃

kyanne kyrose

🙃
View GitHub Profile
@kyrose
kyrose / specialbash.md
Created April 28, 2021 21:38
Special parameters in Bash

Special parameters

parameter definition
$0 Returns name of shell/shell-script currently being executed
$n Positional parameters
$* All positional parameters as a single string
$@ List of all positional parameters
$# Number of positional parameters
$? Exit status of last executed command
.grid {
width: 100%;
display: grid;
grid-template-columns: 1fr;
gap: .5rem;
padding: .5rem;
@media #{$mq-md} {
grid-template-columns: repeat(2, 1fr);
}
//* -------------------------------------------------------------------------- */
// Sans
$font-stack-system-sans: (
system-ui,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
"Roboto",
"Oxygen",
"Ubuntu",
@kyrose
kyrose / .gitlab-ci.yml
Created April 1, 2020 10:11
ci/cd config that finally deployed successfully, albeit slowly
image: ruby:2.5
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
before_script:
- gem install jekyll bundler
- bundle
@kyrose
kyrose / port-listening.md
Created December 15, 2019 11:40
commands to listen for open ports on your machine

Port Listening

Using lsof

To display a list of open ports on the machine:

$ lsof -i

COMMAND  PID   USER  FD    TYPE  DEVICE  SIZE/OFF   NODE  NAME
app 2353 user cwd IPv4 420666 0t0 TCP fs:mountpoint
@kyrose
kyrose / gitignores.md
Last active November 16, 2019 22:34
.gitignore templates

.gitignore files

Jekyll

# Jekyll
_site/
*-cache/
.jekyll-metadata
vendor
@kyrose
kyrose / LICENSE.md
Created October 13, 2019 05:17
GNU General Public License written in markdown

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. http://fsf.org/

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

@kyrose
kyrose / ruleset.css
Created September 20, 2019 20:09
A reference for grouping selector properties by type. From https://css-tricks.com/poll-results-how-do-you-order-your-css-properties/
.selector {
/* Positioning */
position: absolute;
z-index: 10;
top: 0;
right: 0;
/* Display & Box Model */
display: inline-block;
overflow: hidden;
@kyrose
kyrose / shell.sh
Created September 18, 2019 21:22
Undoing a commit
$ git commit -m "Something dumb" # (1)
$ git reset HEAD~ # (2)
# edit or add files # (3)
$ git add ... # (4)
$ git commit -c ORIG_HEAD # (5)
@kyrose
kyrose / config
Created September 14, 2019 19:53
Tell Git which SSH key to use for commits
## In ~/.ssh/config add:
host github.com
HostName github.com
IdentityFile ~/.ssh/<keyname>
User git