Skip to content

Instantly share code, notes, and snippets.

View ecampusdev's full-sized avatar

eCampuslearning-Dev ecampusdev

View GitHub Profile
@ecampusdev
ecampusdev / .gitconfig
Created September 4, 2024 09:01 — forked from samueljon/.gitconfig
.gitconfig and .gitignore_global config examples
[core]
excludesfile = /Users/samueljon/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[user]
name = your name
@ecampusdev
ecampusdev / oraclecloud.rb
Created September 2, 2024 22:26 — forked from andrkrn/oraclecloud.rb
oracle cloud create free instance
require 'open3'
require 'json'
availability_domain = ""
compartment_id = ""
shape = ""
image_id = ""
subnet_id = ""
ssh_pub_key_path = ""

how to leverage oracle's temping offers

free tier limits

The limits of the free tier say that you can create up to 4 instances.

  • x2 x86 instances (2core/1g)
  • x2 ampere instances (with 4core/24g spread between them)
  • 200GB total boot volume space across all intances (minimum of 50G per instance)

create your account

# https://github.com/wurstmeister/kafka-docker
# https://medium.com/big-data-engineering/hello-kafka-world-the-complete-guide-to-kafka-with-docker-and-python-f788e2588cfc
version: '3'
services:
zookeeper:
image: wurstmeister/zookeeper:3.4.6
ports:
- "2181:2181"
@ecampusdev
ecampusdev / powershell-web-server.ps1
Created March 5, 2024 05:28 — forked from 19WAS85/powershell-web-server.ps1
A simple web server built with powershell.
# This is a super **SIMPLE** example of how to create a very basic powershell webserver
# 2019-05-18 UPDATE — Created by me and and evalued by @jakobii and the comunity.
# Http Server
$http = [System.Net.HttpListener]::new()
# Hostname and port to listen on
$http.Prefixes.Add("http://localhost:8080/")
# Start the Http Server
@ecampusdev
ecampusdev / KeePass.ps1
Created February 24, 2024 09:45 — forked from adamrushuk/KeePass.ps1
KeePass PowerShell examples
#Requires -RunAsAdministrator
# Testing KeePass automation against KeePass v2.39.1
# Vars
$masterKeyCredential = New-Object -TypeName 'PSCredential' -ArgumentList ('KPMasterUser', (ConvertTo-SecureString -String 'Passw0rd123!' -AsPlainText -Force))
$repoPath = 'C:\Code\KeePass\KeePassDB'
$databaseName = 'KeePassDatabase'
$databasePath = Join-Path -Path $repoPath -ChildPath "$databaseName.kdbx"
$databaseProfileName = 'KeePassDatabaseProfile01'
$testGroupName = 'TestAccounts'
@ecampusdev
ecampusdev / README.md
Created February 20, 2024 15:22 — forked from deviantony/README.md
Portainer HTTP API by example

DEPRECATION NOTICE

This gist is now deprecated in favor of our official documentation: https://documentation.portainer.io/api/api-examples/ which contains up to date examples!

THE FOLLOWING DOCUMENTATION IS DEPRECATED

Please refer to the link above to get access to our updated API documentation and examples.

@ecampusdev
ecampusdev / config
Last active August 3, 2024 21:59 — forked from pksunkara/config
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = eCampus Developer
email = webmaster@ecampuslearning.com
username = ecampusdev
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@ecampusdev
ecampusdev / Dockerfile
Created February 3, 2024 16:06 — forked from projectoperations/Dockerfile
Dockerfile Example
FROM <image>:<tag>
MAINTAINER <name>
# RUN executes any commands in a new layer on top of the current image and
# commits the results. The resulting committed image will be used for the
# next step in the Dockerfile
# 2 forms:
# RUN <command> (shell form if /bin/sh exists)
# RUN ["executable", "param1", "param2"] (exec form)
@ecampusdev
ecampusdev / Dockerfile
Created January 26, 2024 09:41 — forked from swdunlop/Dockerfile
Rootless Nix Dev Container for Visual Code hackers
# See here for base image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/alpine/.devcontainer/base.Dockerfile
ARG ALPINE_VERSION="3.14"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-alpine-${ALPINE_VERSION}
USER root
# https://nvd.nist.gov/vuln/detail/CVE-2019-5021
RUN sed -i -e 's/^root::/root:!:/' /etc/shadow