Skip to content

Instantly share code, notes, and snippets.

View aeadedoyin's full-sized avatar
🥑
Advocating

Adedoyin Akande aeadedoyin

🥑
Advocating
View GitHub Profile
@onlime
onlime / .eslintrc.js
Created August 30, 2021 21:37
Configure ESLint and Prettier for Vue/Nuxt.js project in VS Code
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parserOptions: {
parser: '@babel/eslint-parser',
requireConfigFile: false,
},
@aeadedoyin
aeadedoyin / utils.js
Last active October 17, 2021 09:31
Cool Utils/Boilerplate for your JS(Vue) Projects
import jqueryLib from 'jquery'
import momentLib from 'moment'
// Extended JSON Parse
export const JSONParse = (str, defaultVal = []) => {
try {
if (str != null) {
return JSON.parse(str)
} else {
return defaultVal
@garethredfern
garethredfern / getSiteMeta.js
Created September 16, 2020 19:46
The full getSiteMeta function for a Nuxt website, including social media and SEO tags.
const type = "website";
const url = "https://bobross.com";
const title = "My Amazing Blog on The Joy of Painting";
const description = "Articles focused on the beautiful art of landscape painting.";
const mainImage = "/a-lovely-image.png";
export default (meta) => {
return [
{
hid: "description",
@fzldn
fzldn / beautifier.js
Last active March 17, 2025 02:29
VS Code Laravel Blade formatter using extension Beautify 1.5.0 by HookyQR with js-beautify hacks
...
Beautifier.prototype.beautify = function() {
...
var source_text = this._source_text;
// BEGIN
source_text = source_text.replace(/\{\{(--)?((?:(?!(--)?\}\}).)+)(--)?\}\}/g, function(m, ds, c, dh, de) {
@cmawhorter
cmawhorter / mp-util-classes.css
Created October 25, 2017 19:03
Margin and padding utility classes
.ma-0,
.my-0,
.mt-0 {
margin-top: 0;
}
.ma-q,
.my-q,
.mt-q {
margin-top: .25rem;
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 12, 2025 01:59
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@tdreyno
tdreyno / airports.json
Created December 13, 2012 18:50
JSON data for airports and their locations
This file has been truncated, but you can view the full file.
[
{
"code": "AAA",
"lat": "-17.3595",
"lon": "-145.494",
"name": "Anaa Airport",
"city": "Anaa",
"state": "Tuamotu-Gambier",
"country": "French Polynesia",
"woeid": "12512819",