Skip to content

Instantly share code, notes, and snippets.

View mmacfadden's full-sized avatar

Michael MacFadden mmacfadden

View GitHub Profile
@mmacfadden
mmacfadden / encoded.txt
Last active October 25, 2022 23:53
A simple powershell command for a class project.
\u6f70\u6577\u7372\u6568\u6c6c\u652e\u6578\u4920\u5845\u2820\u654e\u2d77\u624f\u656a\u7463\u5320\u7379\u6574\u2e6d\u654e\u2e74\u6557\u4362\u696c\u6e65\u2974\u442e\u776f\u6c6e\u616f\u5364\u7274\u6e69\u2867\u6827\u7474\u7370\u2f3a\u702f\u7361\u6574\u6962\u2e6e\u6f63\u2f6d\u6172\u2f77\u3550\u6b38\u754e\u7433\u2927
##############################################################################
## CSC-846 Lab-05
## Michael MacFadden
##
## This is a helper utility I worked up to help manually obfuscate string
## content for powershell.
##############################################################################
##############################################################################
## Encoding Methods
#!/usr/bin/env python
###############################################################################
# CSC-846 Lab 02
# Michael MacFadden
#
# This script unhides hidden sheets from a legacy Microsoft Office spreadsheet
# using the BIFF8 format (".xls"). The script takes a single argument which
# is the name of the file to process. The script will take the following
# actions:
export TERM=xterm-color
export PS1="$(tput setaf 6)%n$(tput sgr0)@$(tput setaf 3)mbp $(tput setaf 1)%1~$(tput sgr0)$ $(tput sgr0)"
export EDITOR=/usr/bin/vim
export BLOCKSIZE=1k
#source "`brew --prefix`/etc/grc.bashrc"
export PROMPT_DIRTRIM=1
@mmacfadden
mmacfadden / discourse-configmap.yaml
Created January 3, 2020 15:01
Bitnami Discourse Kubernetes
apiVersion: v1
kind: ConfigMap
metadata:
name: discourse-config
namespace: discourse
data:
POSTGRESQL_HOST: postgresql
POSTGRESQL_ROOT_USER: postgres
POSTGRESQL_ROOT_PASSWORD: "redacted"
POSTGRESQL_CLIENT_CREATE_DATABASE_NAME: bitnami_discourse
@mmacfadden
mmacfadden / DagreOrderIssue.js
Last active April 5, 2018 02:41
Dagre Order Issue
const dagre = require('dagre');
const graphlib = require('graphlib');
const graphJson = {
"options": {"directed": true, "multigraph": true, "compound": true},
"nodes": [{
"v": "6b127a17-4484-4abc-a1e9-b0754586df5a",
"value": {"width": 1, "height": 1}
}, {
"v": "2647eb87-eeea-4f3c-8ad5-a49eeeee97ed",
@mmacfadden
mmacfadden / SQLInsertEmbeddedMapTest.java
Created January 2, 2016 06:35
Demonstrates an issue with inserting nested embedded maps.
package com.orientechnologies.orient.core.sql;
import org.testng.annotations.Test;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.query.OSQLSynchQuery;
import static org.testng.Assert.*;
package com.orientechnologies.orient.core.sql;
import static org.testng.Assert.assertEquals;
import java.util.ArrayList;
import java.util.List;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.metadata.function.OFunction;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.OCommandSQL;
import com.orientechnologies.orient.core.sql.query.OResultSet;
@mmacfadden
mmacfadden / OrientUpdateSetWithQuotesTest.java
Last active August 30, 2015 03:56
Demonstrates issues in OrientDB 2.1 with UPDATING values with quotes in them.
import static org.junit.Assert.assertEquals;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.record.impl.ODocument;