Skip to content

Instantly share code, notes, and snippets.

View Oceanswave's full-sized avatar
🎯
Focusing

Sean McLellan Oceanswave

🎯
Focusing
View GitHub Profile
@Oceanswave
Oceanswave / ACD Secure Storage
Created March 10, 2017 21:57
Using a Raspberry Pi as a local gateway to unlimited encrypted storage via Amazon Cloud Drive
The Pi is Linux, so it can be done with shell scripts easily. Here is a part of a guide I wrote for setting up an encrypted ACD on Linux. I tried to use only the relevant parts, sorry if it seems disjointed.
After that, install the software that we will be using.
sudo apt-get update
sudo apt-get install sshfs
sudo apt-get install encfs
sudo apt-get install python3-pip
pip3 install --upgrade git+https://github.com/yadayada/acd_cli.git
acd_cli init
We will need to add the Amazon authorization key to the .cache/acd_cli/ folder. Instructions can be found at http://acd-cli.readthedocs.io/en/latest/authorization.html
<div style="display:block;position:relative;min-width:0px;max-width:640px"><div style="padding-top:56.25%"><video data-video-id="5742275941001" data-account="5718741448001" data-player="default" data-embed="default" data-usage="cms:sharepoint:16.0.7625.1214:4.0.0-beta20:javascript" class="video-js" controls="" style="width:100%;height:100%;position:absolute;top:0px;bottom:0px;right:0px;left:0px"></video><script src="//players.brightcove.net/5718741448001/default_default/index.min.js"></script></div></div>
@Oceanswave
Oceanswave / gist:0f157e66df1d090411ae
Last active March 1, 2018 09:00
Install Barista on SP2013

Screencast of a Barista deployment on SP2013

This gist shows how a normal Barista installation from scratch goes on SP2013.

There's some sort of impression that there's some magic going on here. There's not. A single command gets run with at max 4 parameters.

Screencapture GIF

note the time in the lower right corner. Takes 2 minutes 32 seconds overall on not-a-super-computer single VM SP2013 installation with typing included.

@Oceanswave
Oceanswave / addLocalUser.ps1
Last active March 1, 2018 08:58
Powershell function to add a user to a local group
function Add-LocalUser{
Param(
$computer=$env:computername,
$group='Guests',
$userdomain=$env:userdomain,
$username=$env:username
)
([ADSI]"WinNT://$computer/$Group,group").psbase.Invoke("Add",([ADSI]"WinNT://$domain/$user").path)
}
@Oceanswave
Oceanswave / TODO
Last active March 1, 2018 08:57
TODO - Stuff that I need to work on
Things to do...
@Oceanswave
Oceanswave / gist:eb310e022cea56ccfe95
Last active March 1, 2018 08:56
Extract data from pfx for AWS Api Gateway
Get OpenSSL:
https://www.openssl.org/related/binaries.html
Procedure
create an CSR, submit it to a CA, Get the CER back, Import into MMC -> Certificates Snapin, Export with private key.
Take the file you exported (e.g. certname.pfx) and copy it to a system where you have OpenSSL installed. Note: the *.pfx file is in PKCS#12 format and includes both the certificate and the private key.
Certificate Body:
Run the following command to export the certificate: openssl pkcs12 -in certname.pfx -nokeys -clcerts -out name.pem
@Oceanswave
Oceanswave / MessageTemplate-AM.txt
Last active October 7, 2017 02:43
Remote Work Message Templates
<p>Good Morning,</p>
<p>I have started my work day.<br/>
<ul>
<li>Start Time: {{format startWorkTime 'h:mm tt'}}</li>
<li>End Time: {{format endWorkTime 'h:mm tt'}}</li>
<li>Phone: 571-393-1415</li>
</ul>
</p>
<p>
var showControls = function() {
uiEventsHappening += 1;
var scrubber = $('#scrubber-component');
var eventOptions = {
'bubbles': true,
'button': 0,
'currentTarget': scrubber[0]
};
scrubber[0].dispatchEvent(new MouseEvent('mousemove', eventOptions));
return delay(10)().then(function() {
@Oceanswave
Oceanswave / gist:fbbb838861a017bf869d
Created June 16, 2015 02:53
FFMPEG GoPro Timelapse
ffmpeg -f image2 -start_number 22096 -i G01%05d.JPG -vcodec libx264 -b:v max -s 1920x1080 stx.mp4
Since you're getting old and senile.
1) Run node script to output files in date order to a file.
var recursive = require('recursive-readdir');
var fs = require("fs");
var inputFolder = process.argv[2];
if (!inputFolder) {
console.log("** YOU GOTTA SPECIFY THE TARGET PATH AS THE FIRST PARAM! **");