This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update -y | |
sudo apt-get install ca-certificates curl gnupg lsb-release | |
# Add Docker’s official GPG key | |
sudo mkdir -m 0755 -p /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package schemagen | |
import ( | |
"fmt" | |
"go/ast" | |
"go/parser" | |
"go/token" | |
"strings" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
gpg --full-generate-key | |
key_id=$(gpg --list-secret-keys --keyid-format=long | grep sec | awk '{print $2}' | awk -F '/' '{print $2}') | |
echo "Key ID: $key_id" | |
gpgKey=$(gpg --armor --export $key_id) | |
echo $gpgKey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```sql | |
-- Create the extension if it doesn't exist | |
CREATE EXTENSION IF NOT EXISTS "pgcrypto"; | |
-- Create table | |
CREATE TABLE IF NOT EXISTS users( | |
id serial not null primary key, | |
username text not null unique, | |
password text not null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ARCH="amd64" | |
LATEST_VERSION="go1.19.3" | |
# "$(curl -sL https://golang.org/VERSION?m=text)" | |
ZIP_FILE="${LATEST_VERSION}.linux-${ARCH}.tar.gz" | |
if [ -f "$ZIP_FILE" ]; then | |
echo "go version $LATEST_VERSION already downloaded" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <qcoreapplication.h> | |
#include <qfile.h> | |
#include <qnetworkaccessmanager.h> | |
#include <qnetworkconfiguration.h> | |
#include <qnetworkproxy.h> | |
#include <qnetworkreply.h> | |
#include <qnetworkrequest.h> | |
#include <qsslcertificate.h> | |
#include <qsslconfiguration.h> | |
#include <qsslkey.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Polynomial evaluation with Horner's method | |
#include <stdio.h> | |
#include <stdlib.h> | |
// poly is an array of coefficients | |
// n is the degree of the polynomial + 1 | |
// x is the value at which to evaluate the polynomial | |
// | |
// Returns value of poly[0]x(n-1) + poly[1]x(n-2) + .. + poly[n-1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// program to add two fractions and print results | |
// compile with gcc -o fracadder fracadder.c | |
// run with ./fracadder | |
// Author: Dr. Abiira Nathan J.K | |
// Date: May, 2022 | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char const *argv[]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// prints age given date of birth in form dd/mm/yyyy | |
// compile with: gcc age.c -o age | |
// Author: Dr. Abiira Nathan | |
// Date: May, 2022 | |
// Version: 1.0 | |
// License: MIT License | |
// Copyright (c) 2020 Dr. Abiira Nathan | |
#include <stdio.h> | |
#include <time.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"log" | |
"net/http" | |
"path/filepath" | |
) | |
var ( |
NewerOlder