Skip to content

Instantly share code, notes, and snippets.

@apcurran
apcurran / debugger-steps.md
Last active August 14, 2023 17:16
VS Code Debugger Config (to always debug current file)

Debug Configuration to Always Debug Opened File

Within "launch.json" file, edit configurations.program to be the following:

"program": "${file}"
@apcurran
apcurran / tools.txt
Created August 2, 2022 22:46
Linux CLI Tools
# ripgrep
rg
# find replacement
fd
# postgres
alias pg-start='sudo service postgresql start'
alias pg-run='sudo -u postgres psql'
alias pg-stop='sudo service postgresql stop'
alias pg-status='sudo service postgresql status'
# more ls
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
.grid-columns {
grid-template-columns: repeat(auto-fit, minmax(min(500px, 100%), 1fr));
}
@apcurran
apcurran / snippets.json
Created December 7, 2021 16:05
Emmet Snippets
{
"html": {
"snippets": {
"doc": "html[lang=${lang}]>(head>meta[charset=${charset}]+meta:vp+title{${1:Document}})+body"
}
}
}
@apcurran
apcurran / img-dimensions.html
Created June 21, 2021 22:01
Get image dimensions before uploading a file
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Img Upload With Dimensions</title>
</head>
<body>
<input class="file-input-btn" type="file" name="" id="">
@apcurran
apcurran / bind-call.js
Created June 4, 2021 20:09
Use of bind and call with JS functions
"use strict";
// func.bind();
const person = {
name: "Alex",
sayHi() {
return `Hey ${this.name}`;
}
};
@apcurran
apcurran / gist:a8fd68af17d07b4901310ca18e8a6aa2
Created May 25, 2021 17:27
Heroku psql input file command
heroku psql -f [filename.sql]
"use strict";
const homework = {
topic: "JS",
study() {
console.log(`Please write ${this.topic}.`);
}
};
const jsHomework = Object.create(homework);
@apcurran
apcurran / index.html
Created September 11, 2020 14:37
CSS Parallax
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./style.css">
<title>CSS Parallax</title>
</head>
<body>
<main class="container">