Skip to content

Instantly share code, notes, and snippets.

View clicktechnology's full-sized avatar
🏠
Working from home

clicktechnology

🏠
Working from home
View GitHub Profile
#!/bin/bash
# $2 is the email sender. We want to autoreply to them
# $4 is our filter user email address, typically filter@localhost
# Check the parameters below are right for your system
SENDMAIL="/usr/lib/sendmail"
DOMAIN="YOUR-DOMAIN-NAME-HERE.com"
LOCAL_AUTOREPLY_ADDRESS="filter@localhost"
#!/bin/sh
# Simple shell-based filter. It is meant to be invoked as follows:
# /path/to/script -f sender recipients...
# Localize these. The -G option does nothing before Postfix 2.3.
INSPECT_DIR=/var/spool/filter
SENDMAIL="/usr/sbin/sendmail -G -i" # NEVER NEVER NEVER use "-t" here.
# Exit codes from <sysexits.h>
@clicktechnology
clicktechnology / SignUp.vue
Created November 29, 2021 00:56
This is a sign up form widget for Vue3 using vee-validate and yup. Add "vee-validate": "^4.5.6","yup": "^0.32.11", to your package.json in the root of the project. Now run npm install in the package.json folder. The formatting used was from Bulma 0.9.3, so just add <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.m…
<template>
<form name="requestForm" @submit.prevent="onSubmit">
<span class="has-text-grey-dark">Sign up today!</span>
<h3 class="mb-5 is-size-4 has-text-weight-bold">
Join Us For A <br />
Free Taster Session
</h3>
<div class="field">
<div class="control">
<input class="input" type="text" name="name" v-model="name" placeholder="Your name" />
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Morgan Conlon",
"label": "Programmer",
"image": "https://pbs.twimg.com/profile_images/1435184612209217539/pZpmlphQ_400x400.jpg",
"email": "morgan.conlon@click-technology.com",
"phone": "(912) 555-4321",
"url": "http://richardhendricks.example.com",
"summary": "Richard hails from Tulsa. He has earned degrees from the University of Oklahoma and Stanford. (Go Sooners and Cardinal!) Before starting Pied Piper, he worked for Hooli as a part time software developer. While his work focuses on applied information theory, mostly optimizing lossless compression schema of both the length-limited and adaptive variants, his non-work interests range widely, everything from quantum computing to chaos theory. He could tell you about it, but THAT would NOT be a “length-limited” conversation!",
LOGIN AS ROOT
-----------------------------------------------------------------------------------------
morgan@server:~$ mysql -uroot -p
Password:
DELETE TEST DB/ TEST USER IF THEY EXIST
-----------------------------------------------------------------------------------------
mysql> DROP DATABASE IF EXISTS testdb;
@clicktechnology
clicktechnology / gist:5144fe2824ac1a97dbc3dd723c9c7fb5
Created November 8, 2021 21:07
// JavaScript / NodeJS - Fetch using promises
const myPromise = fetch('https://jsonplaceholder.typicode.com/todos/4');
myPromise
.then(response => response.json())
.then(user => console.log(':-) | ', user.title, user.id, user.completed))
.catch(err => console.log(':-( | ', err))
@clicktechnology
clicktechnology / gist:740b77492f2c027ac2a2a766bc93f812
Last active November 8, 2021 21:08
JavaScript / NodeJS - Fetch using Async / await
const fetchPokemon = async (id) => {
try {
const res = await fetch(`https://pokeapi.co/api/v2/pokemon/${id}`);
const data = await res.json()
console.log('LOL', data, data.name)
console.log(res.status) // get the html code too, check for 200 or 404/500 etc.
} catch(err) {
console.error(err)
} finally {
console.log('I will always run no matter what.')