Skip to content

Instantly share code, notes, and snippets.

View victormwenda's full-sized avatar

Victor Mwenda victormwenda

  • Nairobi, Kenya
View GitHub Profile
@victormwenda
victormwenda / System Design.md
Created January 9, 2024 08:14 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@victormwenda
victormwenda / DocPreviewController.php
Created February 23, 2022 10:51
Yii 2 Framework - Preview file on browser without downloading.
<?php
namespace app\controllers;
use yii\web\Controller;
class DocPreviewController extends Controller
{
public function actionPreview($path)
{
@victormwenda
victormwenda / gist:f39f22514a0c4b442481942ec33fa683
Created July 6, 2021 08:51 — forked from ajokela/gist:1846191
Decrypt passwords stored in Oracle SQL Developer.
import javax.crypto.*;
import javax.crypto.spec.*;
import java.security.*;
/**
* Decrypt passwords stored in Oracle SQL Developer.
* This is intended for password recovery.
*
* Passwords are stored in ~/.sqldeveloper/system2.1.1.64.39/o.jdeveloper.db.connection.11.1.1.2.36.55.30/connections.xml
*/
@victormwenda
victormwenda / stroustrup_advice.md
Created March 20, 2020 06:36
The C++ Programming Language - Bjarne Stroustrup

The C++ Programming Language Bjarne Stroustrup, 3rd edition

Chapter 1 - Notes to the reader

When you program, you create a concrete representation of the ideas in your solution to some problem. Let the structure of the program reflect those ideas as directly as possible:

  1. If you can think of "it" as a separate idea, make it a class.
  2. If you can think of "it" as a separate entity, make it an object of some class.
  3. If two classes have a common interface, make that interface an abstract class.
@victormwenda
victormwenda / Activate Office 2019 for macOS VoL.md
Created November 10, 2019 11:50 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@victormwenda
victormwenda / 01_pkcs12-cacerts-workaround.sh
Created June 20, 2018 02:07 — forked from mikaelhg/01_pkcs12-cacerts-workaround.sh
Workaround for java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
# Ubuntu 18.04 and various Docker images such as openjdk:9-jdk throw exceptions when
# Java applications use SSL and HTTPS, because Java 9 changed a file format, if you
# create that file from scratch, like Debian / Ubuntu do.
#
# Before applying, run your application with the Java command line parameter
# java -Djavax.net.ssl.trustStorePassword=changeit ...
# to verify that this workaround is relevant to your particular issue.
#
# The parameter by itself can be used as a workaround, as well.