Skip to content

Instantly share code, notes, and snippets.

View JessicaMulein's full-sized avatar
:octocat:
Mercurial

Jessica Mulein JessicaMulein

:octocat:
Mercurial
View GitHub Profile
@JessicaMulein
JessicaMulein / RSAKeys.cs
Last active December 25, 2020 08:07 — forked from ststeiger/RSAKeys.cs
Import and export RSA Keys between C# and PEM format using BouncyCastle
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;
using System;
using System.IO;
using System.Security.Cryptography;
namespace MyProject.Data.Encryption
{
@TrillCyborg
TrillCyborg / mastodon-docker-setup.md
Last active October 7, 2024 11:08
Mastodon Docker Setup

Mastodon Docker Setup

Setting up

Clone Mastodon's repository.

# Clone mastodon to ~/live directory
git clone https://github.com/tootsuite/mastodon.git live
# Change directory to ~/live

cd ~/live

@ststeiger
ststeiger / RSAKeys.cs
Created October 25, 2018 11:29 — forked from therightstuff/RSAKeys.cs
Import and export RSA Keys between C# and PEM format using BouncyCastle
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;
using System;
using System.IO;
using System.Security.Cryptography;
namespace MyProject.Data.Encryption
{
@yoeunes
yoeunes / subcheckout
Last active January 5, 2022 20:58
An alternative to "git submodule foreach --recursive git checkout develop"
#!/bin/bash
# add this function to your .bashrc or .zshrc and then run "source ~/.zshrc"
# - subcheckout param1 param2
# by default subcheckout will change to develop in every submodule
# if you pass a first parameter it will checkout to that branch if exist on submodule
# if you pass a second parameter as default branch if the first branch not exists
function subcheckout() {
branch=${1:-develop}
@ammgws
ammgws / edgerouter_lite_openvpn.md
Last active September 2, 2024 19:06
Notes on setting up OpenVPN on Edgerouter Lite

My notes on how I setup OpenVPN server on Edgerouter Lite. Based mostly on this guide from openVPN wiki. This guide assumes easyrsa3 is being used, otherwise substitute whatever the easyrsa2 versions are for the commands below.

This guide will use 3 different machines.

A Public Key Infrastructure (PKI) will be created on each machine:

    1. Server - openVPN server (Edgerouter in this case).
    1. Client(s) - the device(s) you will be connecting from.
    1. CA Server - used to generate and sign certificates for server and clients to use.
@magicsih
magicsih / AesExample.cs
Last active May 4, 2023 12:33
AES Encryption/Decryption Example in C#
using System.Security.Cryptography;
using System.Text;
namespace AesExample
{
class Program
{
private const string ORIGINAL = "this is some data to encrypt";
private const string SAMPLE_KEY = "gCjK+DZ/GCYbKIGiAt1qCA==";
private const string SAMPLE_IV = "47l5QsSe1POo31adQ/u7nQ==";
@ncoder-1
ncoder-1 / gpsd-example.cpp
Last active July 1, 2022 09:07
example C++17 gpsd program using libgpsmm
// Example C++17 gpsd program using libgpsmm
// Has no actual purpose other than output some of libgpsmm struct variables of your choosing.
// reference declarations: https://fossies.org/dox/gpsd-3.22/index.html
//
// compiles without warning as follows:
// g++ -std=c++17 -Wall -pedantic -pthread $(pkg-config --cflags --libs libgps) gpsd-example.cpp -o gpsd-example
// clang++ -std=c++17 -Wall -pedantic -pthread $(pkg-config --cflags --libs libgps) gpsd-example.cpp -o gpsd-example
// Free for the taking.
// Version 1.84
import os
import boto.utils
import boto3
import requests
import datetime
import time
def get_contents(filename):
@albertbori
albertbori / Installation.md
Last active November 13, 2024 14:21
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges