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
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 / SharePoint Online Custom New Doc Set
Last active November 30, 2020 10:00
A custom New Document Set page (newdocset.aspx) in SharePoint Online
.
@Oceanswave
Oceanswave / TODO
Last active March 1, 2018 08:57
TODO - Stuff that I need to work on
Things to do...
@Oceanswave
Oceanswave / gist:0ba18f598e5482f0572d663699cbf4a1
Last active July 19, 2022 06:05
Tips on configuring OpenWRT chaos_calmer on MR3040 v2 to use extoverlay

The issue is that chaos_calmer default image doesn't have enough storage to hold kmod-fs-ext4 on the MR3040. ug!

This is a good start, https://wiki.openwrt.org/doc/howto/extroot

but there's some other tips here.

So, you've got to use image generator to make a custom image that initially doesn't have luci initially, but does have kmod-fs-ext4.

This is much simpler if you've already configured the router and it's connected to the internet.

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! **");
@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 / 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
mylist.txt:
file stx-am-2.mp4
file stx-pm-2.mp4
ffmpeg -f concat -i mylist.txt -c copy output.mpg
@Oceanswave
Oceanswave / gist:9ff4b05bfd8c5c9d42a1
Created June 17, 2015 03:17
More FFMPEG timelapse fun
ls -1v | grep JPG > files.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=21600000 -o windowsill_flowers_7.avi -mf type=jpeg:fps=24 mf://@files.txt -vf scale=1920:1080
4k@90fps, no sound
ls -1v | grep JPG > files.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=21600000 -o windowsill_flowers_7.avi -mf type=jpeg:fps=90 mf://@files.txt -vf scale=3840:2160