Skip to content

Instantly share code, notes, and snippets.

View konung's full-sized avatar
๐Ÿ’ญ
๐Ÿ’™๐Ÿ’›

Nick Gorbikoff konung

๐Ÿ’ญ
๐Ÿ’™๐Ÿ’›
View GitHub Profile
$Path = 'i:\'
$OutCSV = 'c:\Windows\Temp\i_drive_suspects.csv'
$RegEx = "[^-\w\.\ \~\'\(\)\$\&\+\,\@\%]" # This matches anything that isn't a-z, A-Z, 0-9, or the '-', '_', and '.' characters. Add any others you need to permit.
$Output = Get-ChildItem -Path $Path -Recurse | Where-Object -FilterScript { $_.Name -match $RegEx } | ForEach-Object {
$out = [PSCustomObject]@{ # Note: add any additional inforamtion you want to caputure here
Name = $_.Name
FullPath = $Path
Path = (Split-Path -Path $_.FullName)
@konung
konung / autofs.md
Created October 20, 2022 20:06 — forked from rudelm/autofs.md
Use autofs on Mac OS X to mount network shares automatically during access

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master and add the last line:

#
# Automounter master map
#

+auto_master # Use directory service

@konung
konung / 1 Setup vps.md
Created February 5, 2023 21:38 — forked from deHelden/"torn" 1 Setup vps.md
Deploy Rails 6.0.0 to VPS(DigitalOcean Ubuntu 19). Nginx, Puma, Capistrano3, PostgreSQL, Rbenv.

SETUP VPS

based on DigitalOcean guide

Create local project

local$ rails new appname -T -d postgresql
local$ rails g scaffold Story title:string body:text
local$ rails db:migrate
@konung
konung / app.DockerFile
Created February 5, 2023 21:41 — forked from satendra02/app.DockerFile
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable where the Rails app is installed to inside of Docker image:
ENV RAILS_ROOT /var/www/app_name
RUN mkdir -p $RAILS_ROOT
# Set working directory, where the commands will be ran:
@konung
konung / fly.toml
Created March 2, 2023 16:42 — forked from dNitza/fly.toml
Hanami 2.0 fly.io config
app = "app-name"
kill_signal = "SIGINT"
kill_timeout = 5
[deploy]
release_command = "bin/hanami db migrate"
[env]
HANAMI_ENV="production"
@konung
konung / fedex_track.json
Created October 15, 2023 23:00
Fedex Track API
{
"openapi": "3.0.0",
"servers": [
{
"url": "https://apis-sandbox.fedex.com",
"description": "Sandbox Server"
},
{
"url": "https://apis.fedex.com",
"description": "Production Server"